- Subject: Re: [PATCH 2/4] KVM: VMX: Add functions to fill VMCSINFO
- From: zhangyanfei <zhangyanfei@xxxxxxxxxxxxxx>
- Date: Wed, 11 Apr 2012 18:34:36 +0800
- Cc: mtosatti@xxxxxxxxxx, ebiederm@xxxxxxxxxxxx, luto@xxxxxxx, joerg.roedel@xxxxxxx, dzickus@xxxxxxxxxx, paul.gortmaker@xxxxxxxxxxxxx, gregkh@xxxxxxx, ludwig.nussel@xxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx
- In-reply-to: <4F85454E.6020201@redhat.com>
- References: <4F84E0DF.8040206@cn.fujitsu.com> <4F84E365.10201@cn.fujitsu.com> <4F85454E.6020201@redhat.com>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4
于 2012年04月11日 16:48, Avi Kivity 写道:
> On 04/11/2012 04:50 AM, zhangyanfei wrote:
>> This patch is to implement the feature that at initialization of
>> kvm_intel module, fills VMCSINFO with a VMCS revision identifier,
>> and encoded offsets of VMCS fields. The reason why we put the
>> VMCSINFO processing at the initialization of kvm_intel module
>> is that it's dangerous to rob VMX resources while kvm module is
>> loaded.
>
> Maybe it should be done by a separate module.
>
If we put vmcsinfo processing at the initialization of kvm_intel module,
as soon as the kvm_intel module is loaded, VMCSINFO is filled. And it is
because vmcsinfo processing is at the initialization of kvm_intel module,
no kvm guests are running, so it will not rob any VMX resources.
If it is done by a separate module, I am afraid this module may not be
loaded when the kernel needs VMCSINFO.
>> +
>> + kvm_cpu_vmxon(__pa(per_cpu(vmxarea, raw_smp_processor_id())));
>> + vmcs_load(vmcs);
>
> Should do this after writing into the vmcs directly (vmcs_load() may
> cache some information for vmcs_read()).
>
Hmm, thanks for pointing this.
--
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
[KVM ARM]
[KVM ia64]
[KVM ppc]
[Spice Development]
[Libvirt]
[Libvirt Users]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Linux Kernel]
[Linux SCSI]
[XFree86]