public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Haitao Shan <maillists.shan@gmail.com>
Cc: "Yang, Wei Y" <wei.y.yang@intel.com>,
	"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: Tue, 24 May 2011 10:38:46 +0300	[thread overview]
Message-ID: <4DDB6086.9050102@redhat.com> (raw)
In-Reply-To: <BANLkTikGwL2zYU303riyeJ-aSZ311es+bA@mail.gmail.com>

On 05/24/2011 05:53 AM, Haitao Shan wrote:
>
>
>     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.
>
> Basically, all SMEP-capable platform has EPT, which is on by default 
> in KVM. Thus, we naturally thought there was little value to add it to 
> SPT.

We try to keep features orthogonal.  That has value for testing, and 
results in clearer code.

> Another thing that we are not so sure of is whether SPT has tricky 
> usages on U bit (for optimization or whatever). With SMEP, this trick 
> may be easily broken.

In fact it does, we play with the U bit to emulate cr0.wp.  I'll be 
happy to write the patch to handle this issue, since I'm familiar with 
the code.

> Anyway, we are investigating enabling SMEP with SPT now.
>

Great, thanks.

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


      parent reply	other threads:[~2011-05-24  7:38 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
     [not found]       ` <BANLkTikGwL2zYU303riyeJ-aSZ311es+bA@mail.gmail.com>
2011-05-24  7:38         ` 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=4DDB6086.9050102@redhat.com \
    --to=avi@redhat.com \
    --cc=haitao.shan@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=maillists.shan@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox