From: Wanpeng Li <wanpeng.li@hotmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>, Jan Kiszka <jan.kiszka@siemens.com>
Cc: Bandan Das <bsd@redhat.com>, Wincy Van <fanwenyi0529@gmail.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: vmx: fix VPID is 0000H in non-root operation
Date: Wed, 16 Sep 2015 21:53:35 +0800 [thread overview]
Message-ID: <BLU436-SMTP108B8E50BECEB570CADFB81805B0@phx.gbl> (raw)
In-Reply-To: <55F963B6.9070402@redhat.com>
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
prev parent reply other threads:[~2015-09-16 13:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 11:31 Wanpeng Li
2015-09-16 12:32 ` Jan Kiszka
2015-09-16 12:42 ` Paolo Bonzini
2015-09-16 13:53 ` Wanpeng Li [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BLU436-SMTP108B8E50BECEB570CADFB81805B0@phx.gbl \
--to=wanpeng.li@hotmail.com \
--cc=bsd@redhat.com \
--cc=fanwenyi0529@gmail.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®