On 03/03/2017 13:37, James Hogan wrote: > Actually I think the way I had designed KVM_CAP_MIPS_VZ is fine. I had > defined it as an enumeration rather than a mask because it isn't > expected you'd have more than one hardware virtualisation type able to > run on a particular core. > > Whether T&E is still supported is I think better exposed by a new > KVM_CAP_MIPS_TE capability, indicating whether T&E is exposed when > KVM_CAP_MIPS_VZ is also set. > > It would be set to 1 on new kernels whenever T&E is supported. > > For compatibility with older kernels, userland would be expected to > determine whether T&E is present by: > check(KVM_CAP_MIPS_VZ) == 0 || check(KVM_CAP_MIPS_TE) != 0 > > Old userland that doesn't check KVM_CAP_MIPS_TE would just hit an EINVAL > from KVM_CREATE_VM if T&E isn't supported. That's okay. Paolo
Attachment:
signature.asc
Description: OpenPGP digital signature