Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1226100

Re: [PATCH] KVM: vmx: fix VPID is 0000H in non-root operation

From Wanpeng Li <wanpeng.li@hotmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] KVM: vmx: fix VPID is 0000H in non-root operation
Date 2015-09-16 16:00 +0200
Message-ID <q9lpE-6fG-9@gated-at.bofh.it> (permalink)
References <q9je9-3cq-1@gated-at.bofh.it> <q9kae-4xl-3@gated-at.bofh.it> <q9kjT-4IQ-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 9/16/15 8:42 PM, Paolo Bonzini wrote:
>
> On 16/09/2015 14:32, Jan Kiszka wrote:
>> BTW, what will happen if allocate_vpid runs out of free slots and
>> returns 0? Will we always fail then...?
> The return value of vmx_secondary_exec_control will not have
> SECONDARY_EXEC_ENABLE_VPID, so it's okay.  However, I think
> we need this in the nested VPID patches:
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index c23482cda1a7..e6859b45b00b 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -9456,7 +9460,7 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12)
>   	else
>   		vmcs_write64(TSC_OFFSET, vmx->nested.vmcs01_tsc_offset);
>
> -	if (enable_vpid) {
> +	if (vmx->nested.vpid02) {
>   		/*
>   		 * There is no direct mapping between vpid02 and vpid12, the
>   		 * vpid02 is per-vCPU for L0 and reused while the value of
>

Looks good to me.

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


Thread

[PATCH] KVM: vmx: fix VPID is 0000H in non-root operation Wanpeng Li <wanpeng.li@hotmail.com> - 2015-09-16 13:40 +0200
  Re: [PATCH] KVM: vmx: fix VPID is 0000H in non-root operation Jan Kiszka <jan.kiszka@siemens.com> - 2015-09-16 14:40 +0200
    Re: [PATCH] KVM: vmx: fix VPID is 0000H in non-root operation Paolo Bonzini <pbonzini@redhat.com> - 2015-09-16 14:50 +0200
      Re: [PATCH] KVM: vmx: fix VPID is 0000H in non-root operation Wanpeng Li <wanpeng.li@hotmail.com> - 2015-09-16 16:00 +0200

csiph-web