Hiya,

QEMU (ab)uses the kvm encoding of system register ids in the migration stream. As we implement support for FEAT_D128, it would be good to agree on an encoding for the 128-bit registers so that we can avoid complications with migration later.

I don't think this is terribly complicated. Simply adjust the value in the KVM_REG_SIZE_MASK field from U64 to U128. E.g.

PAR_EL1 (64-bit)        (__ARM64_SYS_REG(3, 0, 7, 4, 0) | KVM_REG_SIZE_U64)
PAR_EL1 (128-bit)       (__ARM64_SYS_REG(3, 0, 7, 4, 0) | KVM_REG_SIZE_U128)

This will currently be cleanly rejected by index_to_params, resulting in ENOENT for the ioctl. When KVM grows support for D128 guests, kvm_sys_reg_{get,set}_user can select the read/write code path based on reg->id & KVM_REG_SIZE_MASK.

Comments?


r~

Reply via email to