Re: [PATCH v2 1/3] KVM: VMX: move msr_ia32_feature_control to vcpu_vmx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux