lkml.org 
[lkml]   [2016]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/3] KVM: VMX: move msr_ia32_feature_control to vcpu_vmx
From
Date


On 16/06/2016 13:49, Borislav Petkov wrote:
>> > enum segment_cache_field {
>> > @@ -2907,7 +2908,7 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
>> > case MSR_IA32_FEATURE_CONTROL:
>> > if (!nested_vmx_allowed(vcpu))
>> > return 1;
>> > - msr_info->data = to_vmx(vcpu)->nested.msr_ia32_feature_control;
>> > + msr_info->data = to_vmx(vcpu)->msr_ia32_feature_control;
> Since this moves out of struct nested_vmx, that check above it:
>
> if (!nested_vmx_allowed(vcpu))
>
> should not influence it anymore, no?

For get, yes, this "if" should go.

For set, you need to check that the guest doesn't write to reserved
bits. So as of this patch the "if" remains tied to VMX, but the next
patch changes it to be generic.

Paolo

> Ditto for the rest.

\
 
 \ /
  Last update: 2016-06-16 14:41    [W:0.047 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site