• Paolo Bonzini's avatar
    KVM: x86: disable MPX if host did not enable MPX XSAVE features · a87036ad
    Paolo Bonzini authored
    When eager FPU is disabled, KVM will still see the MPX bit in CPUID and
    presumably the MPX vmentry and vmexit controls.  However, it will not
    be able to expose the MPX XSAVE features to the guest, because the guest's
    accessible XSAVE features are always a subset of host_xcr0.
    
    In this case, we should disable the MPX CPUID bit, the BNDCFGS MSR,
    and the MPX vmentry and vmexit controls for nested virtualization.
    It is then unnecessary to enable guest eager FPU if the guest has the
    MPX CPUID bit set.
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    a87036ad
cpuid.h 5.07 KB