From: Marcelo Tosatti <mtosatti@redhat.com>
To: "Mao, Junjie" <junjie.mao@intel.com>
Cc: "'kvm@vger.kernel.org'" <kvm@vger.kernel.org>
Subject: Re: [PATCH v2] KVM: x86: Implement PCID/INVPCID for guests with EPT
Date: Thu, 17 May 2012 11:46:32 -0300 [thread overview]
Message-ID: <20120517144632.GA14433@amt.cnet> (raw)
In-Reply-To: <EF5A1D57CFBD5A4BA5EB3ED985B6DC6E067650@SHSMSX101.ccr.corp.intel.com>
On Thu, May 17, 2012 at 02:37:21AM +0000, Mao, Junjie wrote:
> > > You can disable INVPCID exec control (which #UDs), if its in Level-2
> > > guest mode (see if_guest_mode()), and restore the Level-1 value when
> > > leaving nested mode.
> >
> > This "!cpu_has_hypervisor " is brought by my ignorance on nested vmx. Sorry
> > for that.
> >
>
> BTW, this 'vmx_pcid_supported' is used for determining whether X86_FEATURE_[PCID|INVPCID] should be exposed for KVM_GET_SUPPORTED_CPUID ioctl. These bits are exposed to qemu in L0 if cpuid of L0 has them, but should now always be hidden from qemu in L1 no matter cpuid of L1 has them or not. I think that, for guest hypervisor, 'do_cpuid_ent' is run in L1 which has this hypervisor bit in its cpuid, giving rise to this '!cpu_has_hypervisor'. Do I understand things in the right way?
The L2 guest should not execute with INVPCID_ENABLE secondary exec
control set (because PCID is not supported for the L2 guest).
INVPCID in L2 should #UD.
See item 1 in Nadav's message.
next prev parent reply other threads:[~2012-05-17 14:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 6:25 [PATCH v2] KVM: x86: Implement PCID/INVPCID for guests with EPT Mao, Junjie
2012-05-15 2:42 ` Marcelo Tosatti
2012-05-15 5:50 ` Nadav Har'El
2012-05-17 1:22 ` Mao, Junjie
2012-05-17 2:37 ` Mao, Junjie
2012-05-17 14:46 ` Marcelo Tosatti [this message]
2012-05-17 2:54 ` Marcelo Tosatti
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=20120517144632.GA14433@amt.cnet \
--to=mtosatti@redhat.com \
--cc=junjie.mao@intel.com \
--cc=kvm@vger.kernel.org \
/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