Re: [PATCH v2 21/66] KVM: x86: Use supported_xcr0 to detect MPX support

Paolo Bonzini
2020-03-03T14:34:15Z

On 03/03/20 00:56, Sean Christopherson wrote:
>
> bool kvm_mpx_supported(void)
> {
> - return ((host_xcr0 & (XFEATURE_MASK_BNDREGS | XFEATURE_MASK_BNDCSR))
> - && kvm_x86_ops->mpx_supported());
> + return supported_xcr0 & (XFEATURE_MASK_BNDREGS | XFEATURE_MASK_BNDCSR);
> }

Better check that both bits are set.

Paolo