WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow gu

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it
From: Boris Derzhavets <bderzhavets@xxxxxxxxx>
Date: Sun, 8 Mar 2009 00:52:53 -0800 (PST)
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Marc - A. Dahlhaus \[ Administration | Westermann GmbH \]" <mad@xxxxxx>
Delivery-date: Sun, 08 Mar 2009 00:53:46 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1236502373; bh=XP7xYqPlqLfbU4lzCLEF5TogdEYAMtEST0CYtddI7II=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=3zztIw6W410t+FStjGyfk2+L29rhE9+xzK8ifkCRka4pLxPj6DgilWRMKRLisqmA5Bjf+EKA1Wl7I6Lc2dQ4w98gUZE+zAKce8awo/t3oqeHx5of2DaoeO4aOpLmN7tNpCHrc+57tldrYLHT1AqjS5a89jAhz8KRSko9E6Soeg0=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=pi1I2StI0NMjc9WEKEVXmDFLEI6knAtOMcFrI5XJn39cQ1pLGY8A/2jJ8JzBm7uy15+X6+oG+OAdSm/d3kFNAk4Ov6X/NmDYmMrTahibjWmWrv5oSUB4omjbyl78ODGYrW2u/IEHcAy/NR4sz3cgc21R3Z8txM4gEB6b31K860Q=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49B35829.1010403@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Performed:-

cd /usr/src/linux-2.6-xen
git pull
make
make modules_install install
mkinitramfs -o /boot/initrd-2.6.29-rc7-tip.img 2.6.29-rc7-tip

Now kernel boots on Q9550
The most recent serial console boot log attached

Boris.
P.S.
 

--- On Sun, 3/8/09, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [PATCH] xen: mask XSAVE in cpuid since we don't allow guests to use it
To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Cc: "Xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Marc - A. Dahlhaus [ Administration | Westermann GmbH ]" <mad@xxxxxx>, "Boris Derzhavets" <bderzhavets@xxxxxxxxx>
Date: Sunday, March 8, 2009, 12:31 AM

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@xxxxxxxxxx>

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 */



Attachment: Q9550S0.log
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel