lkml.org 
[lkml]   [2014]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v5 3/3] KVM: x86: Enable Intel MPX for guest
Date
Paolo Bonzini wrote:
> Il 24/02/2014 11:58, Liu, Jinsong ha scritto:
>> @@ -599,6 +599,9 @@ int __kvm_set_xcr(struct kvm_vcpu *vcpu, u32
>> index, u64 xcr) u64 old_xcr0 = vcpu->arch.xcr0;
>> u64 valid_bits;
>>
>> + if (!kvm_x86_ops->mpx_supported || !kvm_x86_ops->mpx_supported())
>> + xcr0 &= ~(XSTATE_BNDREGS | XSTATE_BNDCSR);
>> +
>> /* Only support XCR_XFEATURE_ENABLED_MASK(xcr0) now */
>> if (index != XCR_XFEATURE_ENABLED_MASK)
>> return 1;
>
> This hunk is incorrect, and I can simply drop it when applying. If
> MPX is not supported, it should not be in the 0Dh CPUID leaf and thus
> in vcpu->arch.guest_supported_xcr0.
>
> This however relies on userspace passing a "sensible" value of CPUID.
> I'll send a patch to strengthen the computation of
> guest_supported_xcr0.
>
> Thanks!
>
> Paolo

So patch v5 would be applied except you will remove the incorrect hunk, and you will send a patch strengthenning guest_supported_xcr0?

Thanks,
Jinsong

\
 
 \ /
  Last update: 2014-02-24 18:01    [W:0.144 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site