Re: IA32_FEATURE_CONTROL MSR in nested virt

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

 



Il 03/07/2013 10:46, Zhang, Yang Z ha scritto:
> 
>> Il 03/07/2013 10:24, Arthur Chunqi Li ha scritto:
>>> Hi Gleb and Paolo,
>>> When I write test cases for nested virt and found that reading/writing  
>>> IA32_FEATURE_CONTROL will be simply ignored or return 0 (in
>>> arch/x86/kvm/vmx.c) in VM. Checking this MSR will be done by some 
>>> hypervisors (e.g. NOVA) and may cause error then, so it is necessary 
>>> to behave right when read/write it in VM.
>>>
>>> Are there any difficulties to handle this MSR? I have two solutions.
>>> The first one is return the value of physical CPU's and always return 
>>> true when write. This is simple but may behave as if it is a VM 
>>> because write to it after VMXON will not return GP exception. This 
>>> solution can solve most basic problems since this MSR is not commonly 
>>> used. Another solution is adding a field in VCPU to handle this MSR.
>>> This is a complex but better method.
>>>
>>> I think I can complete this if needed.
>>
>> Would it be enough to return 5 (binary 101) on reads if nested VMX is enabled, and #GP on writes?
> Agree!, It should be enough. You cannot return physical value directly since there is no SMX in nested.

Arthur, are you writing a patch?

Paolo
--
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