Re: [RFC][PATCH] KVM: nVMX: Leave VMX mode on apparent CPU reset

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

 



On 2013-12-17 14:25, Paolo Bonzini wrote:
> Il 16/12/2013 10:32, Jan Kiszka ha scritto:
>> As long as we do not expose all the VMX related states to user space,
>> there is no way to properly reset a VCPU when VMX is enabled. Emulate
>> this for now by catching host-side clearings of the feature control MSR.
>> This allows to reboot a VM while it is running some hypervisor code.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
>> ---
>>
>> Better ideas? Or continue to leave it as it is?
> 
> The final vmx_vcpu_reset is the only really ugly part, but it is
> _really_ ugly...  Can you modify QEMU to restore MSRs first, and reduce
> vmx_reset_nested to just
> 
> 	if (is_guest_mode(vcpu))
> 		nested_vmx_vmexit(vcpu);
> 
> 	free_nested(vmx);
> 
> ?

Well, I could make setting of MSR_IA32_FEATURE_CONTROL to 0 an official
"clear VMX" interface. Then QEMU would have to issue this MSR set
request before doing any other CPU state manipulation. Is that what you
have in mind?

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
--
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