Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1246209
| From | Wanpeng Li <wanpeng.li@hotmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 5/5] KVM: nVMX: expose VPID capability to L1 |
| Date | 2015-10-14 00:50 +0200 |
| Message-ID | <qjgyl-3GV-5@gated-at.bofh.it> (permalink) |
| References | <qhduW-4Hx-11@gated-at.bofh.it> <qhduX-4Hx-33@gated-at.bofh.it> <qj93Q-18p-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10/13/15 10:44 PM, Paolo Bonzini wrote:
>
> On 08/10/2015 07:57, Wanpeng Li wrote:
>> Expose VPID capability to L1. For nested guests, we don't do anything
>> specific for single context invalidation. Hence, only advertise support
>> for global context invalidation. The major benefit of nested VPID comes
>> from having separate vpids when switching between L1 and L2, and also
>> when L2's vCPUs not sched in/out on L1.
>>
>> Reviewed-by: Wincy Van <fanwenyi0529@gmail.com>
>> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
>> ---
>> arch/x86/kvm/vmx.c | 36 ++++++++++++++++++++++++------------
>> 1 file changed, 24 insertions(+), 12 deletions(-)
>>
>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
>> index 31d272e..22b4dc7 100644
>> --- a/arch/x86/kvm/vmx.c
>> +++ b/arch/x86/kvm/vmx.c
>> @@ -442,7 +442,7 @@ struct nested_vmx {
>> u32 nested_vmx_true_entry_ctls_low;
>> u32 nested_vmx_misc_low;
>> u32 nested_vmx_misc_high;
>> - u32 nested_vmx_ept_caps;
>> + u64 nested_vmx_ept_vpid_caps;
> Considering that all VMX_VPID_ constants are off by 32, perhaps it's
> simpler to have separate variables for nested_vmx_ept_caps and
> nested_vmx_vpid_caps, and only rejoin them when reading the MSR. It
> will make this patch smaller too.
>
> You can add the new field to struct nested_vmx in patch 3 (leaving it
> initialized to 0, of course).
Good point. I will do it after the new travel recently. :-)
Regards,
Wanpeng Li
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 5/5] KVM: nVMX: expose VPID capability to L1 Wanpeng Li <wanpeng.li@hotmail.com> - 2015-10-08 09:10 +0200
Re: [PATCH v2 5/5] KVM: nVMX: expose VPID capability to L1 Paolo Bonzini <pbonzini@redhat.com> - 2015-10-13 16:50 +0200
Re: [PATCH v2 5/5] KVM: nVMX: expose VPID capability to L1 Wanpeng Li <wanpeng.li@hotmail.com> - 2015-10-14 00:50 +0200
csiph-web