From: Avi Kivity <avi@redhat.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "Yang, Wei Y" <wei.y.yang@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"Li, Xin" <xin.li@intel.com>
Subject: Re: [Patch v3] Enable CPU SMEP feature for KVM
Date: Fri, 27 May 2011 11:47:51 +0300 [thread overview]
Message-ID: <4DDF6537.6040101@redhat.com> (raw)
In-Reply-To: <625BA99ED14B2D499DC4E29D8138F1505C9C008A5E@shsmsx502.ccr.corp.intel.com>
On 05/27/2011 05:56 AM, Tian, Kevin wrote:
> > From: Yang, Wei Y
> > Sent: Thursday, May 26, 2011 9:29 PM
> >
> > This patchset enables a new CPU feature SMEP (Supervisor Mode Execution
> > Protection) in KVM. SMEP prevents kernel from executing code in application.
> > Updated Intel SDM describes this CPU feature. The document will be published
> > soon.
> >
> > This patchset is based on Fenghua's SMEP patch series, as referred by:
> > https://lkml.org/lkml/2011/5/17/523
> >
> > Changes since v2: enable SMEP for spt mode.
>
> another change in this version is to avoid adding SMEP to cr4_guest_owned_bits,
> because architecturally it's required to flush TLB when CR4.SMEP is changed
> which has to be emulated.
That is actually a good change since it allows us to query SMEP without
a vmcs_readl(GUEST_CR4).
> Also based on your comment SMEP is now permitted based on cpuid setting. One pending
> issue though is check_cr_write in emulation path. We changed cr4_reserved_bits
> to vcpu specific instead of global, but check_cr_write doesn't provide a vcpu parameter.
> Looks the whole emulation logic avoids using vcpu context to be neutral. Avi, do you
> have any suggestion for a clean change here? Add cr_reserved_bits array into
> emulation context instead of hard-coding?
We can have a ->cpuid() callback so we can query it dynamically. cr4
writes will be emulated very rarely, after all.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2011-05-27 8:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 13:28 [Patch v3] Enable CPU SMEP feature for KVM Yang, Wei Y
2011-05-27 2:56 ` Tian, Kevin
2011-05-27 8:47 ` Avi Kivity [this message]
2011-05-27 8:45 ` Avi Kivity
2011-05-29 5:16 ` Li, Xin
2011-05-29 6:42 ` Avi Kivity
2011-05-29 7:15 ` Li, Xin
2011-05-29 7:20 ` 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=4DDF6537.6040101@redhat.com \
--to=avi@redhat.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.