LKML Archive on
help / color / mirror / Atom feed
From: Paolo Bonzini <>
To: Sean Christopherson <>
Cc: Vitaly Kuznetsov <>,
	Wanpeng Li <>,
	Jim Mattson <>, Joerg Roedel <>,,
Subject: Re: [PATCH] KVM: x86: Allow guest to set EFER.NX=1 on non-PAE 32-bit kernels
Date: Fri, 6 Aug 2021 13:58:00 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 05/08/21 20:38, Sean Christopherson wrote:
> Fast forward to today, and KVM has long since stopped running the guest
> with the host's EFER.NX.  Not only does KVM context switch EFER if
> host.EFER.NX=1 && guest.EFER.NX=0, KVM also forces host.EFER.NX=0 &&
> guest.EFER.NX=1 when using shadow paging (to emulate SMEP).  Furthermore,
> the entire motivation for the restriction was made obsolete over a decade
> ago when Intel added dedicated host and guest EFER fields in the VMCS
> (Nehalem timeframe), which reduced the overhead of context switching EFER
> from 400+ cycles (2 * WRMSR + 1 * RDMSR) to a mere ~2 cycles.

Both pretty good points. :)  Queued, thanks.


      reply	other threads:[~2021-08-06 11:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 18:38 Sean Christopherson
2021-08-06 11:58 ` Paolo Bonzini [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] KVM: x86: Allow guest to set EFER.NX=1 on non-PAE 32-bit kernels' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).