From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 0/5] Fix EFER.NX=0 with EPT
Date: Fri, 30 Apr 2010 19:36:32 +0300 [thread overview]
Message-ID: <4BDB0710.4030908@redhat.com> (raw)
In-Reply-To: <20100428232219.GA30191@amt.cnet>
On 04/29/2010 02:22 AM, Marcelo Tosatti wrote:
> On Wed, Apr 28, 2010 at 04:47:14PM +0300, Avi Kivity wrote:
>
>> Currently we run with EFER.NX=1 on the guest even if the guest value is 0.
>> This is fine with shadow, since we check bit 63 when instantiating a page
>> table, and fault if bit 63 is set while EFER.NX is clear.
>>
>> This doesn't work with EPT, since we no longer get the change to check guest
>> ptes. So we need to run with EFER.NX=0.
>>
>> This is complicated by the fact that if we switch EFER.NX on the host, we'll
>> trap immediately, since some host pages are mapped with the NX bit set. As
>> a result, we need to switch the MSR atomically during guest entry and exit.
>>
>>
> Applied, thanks.
>
> Out of curiosity, did you measure the vmentry/vmexit overhead?
>
Just did now.
nx=0: 3384
nx=1: 2203
Perhaps using the dedicated vmcs field is faster (but since it's
optional, we have to support the generic autoload area).
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
prev parent reply other threads:[~2010-04-30 17:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 13:47 [PATCH 0/5] Fix EFER.NX=0 with EPT Avi Kivity
2010-04-28 13:47 ` [PATCH 1/5] KVM: Let vcpu structure alignment be determined at runtime Avi Kivity
2010-04-28 13:47 ` [PATCH 2/5] KVM: VMX: Add definition for msr autoload entry Avi Kivity
2010-04-28 13:47 ` [PATCH 3/5] KVM: VMX: Add definitions for guest and host EFER autoswitch vmcs entries Avi Kivity
2010-04-28 13:47 ` [PATCH 4/5] KVM: VMX: Add facility to atomically switch MSRs on guest entry/exit Avi Kivity
2010-04-28 13:47 ` [PATCH 5/5] KVM: VMX: Atomically switch efer if EPT && !EFER.NX Avi Kivity
2010-04-30 17:37 ` Marcelo Tosatti
2010-04-30 17:56 ` Avi Kivity
2010-05-02 10:01 ` Avi Kivity
2010-04-28 23:22 ` [PATCH 0/5] Fix EFER.NX=0 with EPT Marcelo Tosatti
2010-04-30 16:36 ` Avi Kivity [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=4BDB0710.4030908@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@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