From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Yang, Wei Y" <wei.y.yang@intel.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [Patch] Disallow SMEP for PV guest
Date: Wed, 1 Jun 2011 10:55:17 -0400 [thread overview]
Message-ID: <20110601145517.GA8204@dumpdata.com> (raw)
In-Reply-To: <5D8008F58939784290FAB48F5497519844F6FB0DE5@shsmsx502.ccr.corp.intel.com>
On Wed, Jun 01, 2011 at 10:31:12PM +0800, Yang, Wei Y wrote:
> This patch disallows SMEP for PV guest.
What are the reasons for it? What do we gain from it?
>
> Signed-off-by: Yang, Wei <wei.y.yang@intel.com>
> Signed-off-by: Shan, Haitao <haitao.shan@intel.com>
> Signed-off-by: Li, Xin <xin.li@intel.com>
>
> ---
> xc_cpufeature.h | 3 +++
> xc_cpuid_x86.c | 5 +++++
> 2 files changed, 8 insertions(+)
>
> diff -r 6f72160d2d55 tools/libxc/xc_cpufeature.h
> --- a/tools/libxc/xc_cpufeature.h Wed Jun 01 19:57:32 2011 +0800
> +++ b/tools/libxc/xc_cpufeature.h Wed Jun 01 22:21:33 2011 +0800
> @@ -141,4 +141,7 @@
> #define X86_FEATURE_TBM (6*32+21) /* trailing bit manipulations */
> #define X86_FEATURE_TOPOEXT (6*32+22) /* topology extensions CPUID leafs */
>
> +/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 7 */
> +#define X86_FEATURE_SMEP (7*32+ 7) /* Supervisor Mode Execution Protection */
> +
> #endif /* __LIBXC_CPUFEATURE_H */
> diff -r 6f72160d2d55 tools/libxc/xc_cpuid_x86.c
> --- a/tools/libxc/xc_cpuid_x86.c Wed Jun 01 19:57:32 2011 +0800
> +++ b/tools/libxc/xc_cpuid_x86.c Wed Jun 01 22:21:33 2011 +0800
> @@ -470,6 +470,11 @@
> xc_cpuid_config_xsave(xch, domid, xfeature_mask, input, regs);
> break;
>
> + case 7:
> + if ( input[1] == 0 )
> + clear_bit(X86_FEATURE_SMEP, regs[1]);
> + break;
> +
> case 0x80000001:
> if ( !guest_64bit )
> {
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-06-01 14:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 14:31 [Patch] Disallow SMEP for PV guest Yang, Wei Y
2011-06-01 14:55 ` Konrad Rzeszutek Wilk [this message]
2011-06-01 15:17 ` Li, Xin
2011-06-01 15:36 ` Keir Fraser
2011-06-01 16:01 ` Li, Xin
2011-06-01 17:27 ` Konrad Rzeszutek Wilk
2011-06-01 20:41 ` Keir Fraser
2011-06-01 15:28 ` Keir Fraser
2011-06-01 15:17 ` Jan Beulich
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=20110601145517.GA8204@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=wei.y.yang@intel.com \
--cc=xen-devel@lists.xensource.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.