All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: "Yang, Wei Y" <wei.y.yang@intel.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"Li, Xin" <xin.li@intel.com>,
	"Tian, Kevin" <kevin.tian@intel.com>,
	"Shan, Haitao" <haitao.shan@intel.com>
Subject: Re: [PATCH v2] Enable CPU SMEP feature for KVM
Date: Sun, 22 May 2011 11:11:04 +0300	[thread overview]
Message-ID: <4DD8C518.7010606@redhat.com> (raw)
In-Reply-To: <5D8008F58939784290FAB48F54975198419FB02D33@shsmsx502.ccr.corp.intel.com>

On 05/22/2011 11:08 AM, Yang, Wei Y wrote:
> >  This patch matches with "[PATCH v2] Enable CPU SMEP feature support for QEMU-KVM", no changes since v1.
> >
> >  Enable newly documented SMEP (Supervisor Mode Execution Protection) CPU feature in KVM module.
> >
> >  Intel new CPU supports SMEP (Supervisor Mode Execution Protection). SMEP prevents kernel from executing code in application. Updated Intel SDM describes this CPU feature. The document will be published soon.
> >
> >  This patch is based on Fenghua's SMEP patch series, as referred by: https://lkml.org/lkml/2011/5/17/523
> >  This patch enables guests' usage of SMEP.
> >  Currently, we don't enable this feature for guests with shadow page tables.
>
> >  Why not?  I see nothing that conflicts with shadow.
>
> We don't need to enable it for shadow page table, because shadow has mask against guest/shadow PTE, which may cause problem.  Let's keep shadow as it is because it's already very complex. Assume SMEP machines should have EPT.
>

I don't understand why.  Can you elaborate?

Shadow implements the U bit, which is all that is needed by SMEP as far 
as I can tell.


> >    update walk_addr_generic() to fault if SMEP is enabled and fetching
>
> Comments above.
>
> >  from a user page
>

Needs to be done even from EPT, in case walk_addr_generic() is invoked 
by the emulator.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2011-05-22  8:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-22  5:23 [PATCH v2] Enable CPU SMEP feature for KVM Yang, Wei Y
2011-05-22  6:50 ` Avi Kivity
2011-05-22  8:08   ` Yang, Wei Y
2011-05-22  8:11     ` Avi Kivity [this message]
     [not found]       ` <BANLkTikGwL2zYU303riyeJ-aSZ311es+bA@mail.gmail.com>
2011-05-24  7:38         ` Avi Kivity

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=4DD8C518.7010606@redhat.com \
    --to=avi@redhat.com \
    --cc=haitao.shan@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=wei.y.yang@intel.com \
    --cc=xin.li@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.