lkml.org 
[lkml]   [2012]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] KVM: VMX: Add functions to fill VMCSINFO
于 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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-04-11 12:37    [W:0.084 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site