From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Boris Derzhavets <bderzhavets@yahoo.com>,
Xen-devel <xen-devel@lists.xensource.com>,
"Marc - A. Dahlhaus [ Administration | Westermann GmbH ]"
<mad@wol.de>
Subject: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it
Date: Sat, 07 Mar 2009 21:31:21 -0800 [thread overview]
Message-ID: <49B35829.1010403@goop.org> (raw)
Mask X86_FEATURE_XSAVE in cpuid leaf 1, ecx, as we don't allow guests to
use it (by setting cr4.OSXSAVE).
This prevents crashes in pvops dom0 kernels, as new versions of Linux try
to use this feature.
(This patch deals with dom0 cpuid; I'm not sure where the right place to
set up the default mask for domU is.)
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
diff -r 7f573cb76db4 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c Tue Mar 03 13:22:28 2009 +0000
+++ b/xen/arch/x86/traps.c Sat Mar 07 17:02:03 2009 -0800
@@ -757,6 +757,7 @@
__clear_bit(X86_FEATURE_XTPR % 32, &c);
__clear_bit(X86_FEATURE_PDCM % 32, &c);
__clear_bit(X86_FEATURE_DCA % 32, &c);
+ __clear_bit(X86_FEATURE_XSAVE % 32, &c);
if ( !cpu_has_apic )
__clear_bit(X86_FEATURE_X2APIC % 32, &c);
__set_bit(X86_FEATURE_HYPERVISOR % 32, &c);
diff -r 7f573cb76db4 xen/include/asm-x86/cpufeature.h
--- a/xen/include/asm-x86/cpufeature.h Tue Mar 03 13:22:28 2009 +0000
+++ b/xen/include/asm-x86/cpufeature.h Sat Mar 07 17:02:03 2009 -0800
@@ -95,6 +95,7 @@
#define X86_FEATURE_SSE4_2 (4*32+20) /* Streaming SIMD Extensions 4.2 */
#define X86_FEATURE_X2APIC (4*32+21) /* Extended xAPIC */
#define X86_FEATURE_POPCNT (4*32+23) /* POPCNT instruction */
+#define X86_FEATURE_XSAVE (4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV */
#define X86_FEATURE_HYPERVISOR (4*32+31) /* Running under some hypervisor */
/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
next reply other threads:[~2009-03-08 5:31 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-08 5:31 Jeremy Fitzhardinge [this message]
2009-03-08 8:52 ` [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it Boris Derzhavets
2009-03-08 9:13 ` Keir Fraser
2009-03-09 11:31 ` [PATCH] xen: mask XSAVE in cpuid since we don'tallow " Jan Beulich
2009-03-09 11:45 ` Keir Fraser
2009-03-09 11:18 ` [PATCH] xen: mask XSAVE in cpuid since we don't allow " Boris Derzhavets
2009-03-09 11:26 ` Keir Fraser
2009-03-09 14:31 ` Boris Derzhavets
2009-03-10 22:24 ` Boris Derzhavets
2009-03-11 0:29 ` Jeremy Fitzhardinge
2009-03-11 7:26 ` Boris Derzhavets
2009-03-11 8:40 ` Boris Derzhavets
2009-03-11 9:09 ` Attempt to install SNV_106 under Suse's 2.6.27 xen-ified kernel & Xen Unstable Boris Derzhavets
2009-03-11 11:36 ` Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it Boris Derzhavets
2009-03-11 16:09 ` Jeremy Fitzhardinge
2009-03-11 16:27 ` Boris Derzhavets
2009-03-11 16:50 ` Jeremy Fitzhardinge
2009-03-11 16:57 ` Boris Derzhavets
2009-03-11 17:04 ` Jeremy Fitzhardinge
2009-03-11 17:21 ` Boris Derzhavets
2009-03-11 17:43 ` Boris Derzhavets
2009-03-11 17:47 ` Jeremy Fitzhardinge
2009-03-11 19:49 ` Boris Derzhavets
2009-03-12 0:41 ` Jeremy Fitzhardinge
2009-03-13 14:39 ` Boris Derzhavets
2009-03-13 15:20 ` Jeremy Fitzhardinge
2009-03-13 15:46 ` Hot plug scripts not working c/s 19355 (was: Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it) Dan Magenheimer
2009-03-13 16:05 ` Hot plug scripts not working c/s 19355 Jeremy Fitzhardinge
2009-03-13 16:59 ` Hot plug scripts not working c/s 19355 (was: Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it) Keir Fraser
2009-03-13 17:09 ` Jeremy Fitzhardinge
2009-03-13 18:15 ` Boris Derzhavets
2009-03-13 18:49 ` Andrew Lyon
2009-03-13 19:08 ` Boris Derzhavets
2009-03-16 17:17 ` Dan Magenheimer
2009-03-16 18:00 ` Hot plug scripts not working c/s 19355 Jeremy Fitzhardinge
2009-03-11 19:13 ` Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it Andrew Lyon
2009-03-12 1:21 ` Jeremy Fitzhardinge
2009-03-12 1:54 ` Jeremy Fitzhardinge
2009-03-12 8:48 ` Boris Derzhavets
2009-03-12 8:55 ` Andrew Lyon
2009-03-12 9:34 ` Keir Fraser
2009-03-12 12:36 ` Boris Derzhavets
2009-03-09 11:26 ` [PATCH] xen: mask XSAVE in cpuid since we don't allowguests " Jan Beulich
2009-03-09 11:29 ` Keir Fraser
2009-03-09 16:40 ` Jeremy Fitzhardinge
2009-03-09 17:54 ` Keir Fraser
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=49B35829.1010403@goop.org \
--to=jeremy@goop.org \
--cc=bderzhavets@yahoo.com \
--cc=keir.fraser@eu.citrix.com \
--cc=mad@wol.de \
--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.