FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 09-21-2012, 03:28 PM
Stefan Bader
 
Default Revert "UBUNTU: SAUCE: Force xsave off on older Xen hypervisors"

This reverts commit 85c46aa8b6c17d1a9360559d22f4683b1a38e33e.

It turned out that since 2.6.39 the Xen code in the kernel would
not try to set OSXSAVE in CR4 to find out whether the feature is
supported. Instead it relies on OSXSAVE being set by the HV in
the cpuid bits (which will only happen if supported).

BugLink: http://bugs.launchpad.net/bugs/1044550

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
arch/x86/xen/enlighten.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 5811718..bdf0883 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -188,18 +188,6 @@ void xen_vcpu_restore(void)
}
}

-/*
- * Older (with no clear statement about what old means) Xen hypervisors
- * will crash a PV guest that tries to store OSXSAVE into CR4.
- * To prevent this, we force the feature bits related to this off in the
- * xen cpuid call. This inline function serves as a centralized test
- * on whether the quirk should be done.
- */
-static inline needs_xsave_quirk(unsigned version)
-{
- return (xen_pv_domain() && ((version >> 16) < 4)) ? 1 : 0;
-}
-
static void __init xen_banner(void)
{
unsigned version = HYPERVISOR_xen_version(XENVER_version, NULL);
@@ -211,8 +199,6 @@ static void __init xen_banner(void)
printk(KERN_INFO "Xen version: %d.%d%s%s
",
version >> 16, version & 0xffff, extra.extraversion,
xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : "");
- if (needs_xsave_quirk(version))
- printk(KERN_INFO "Forcing xsave off due to Xen version.
");
}

#define CPUID_THERM_POWER_LEAF 6
@@ -263,7 +249,6 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,

static void __init xen_init_cpuid_mask(void)
{
- unsigned version = HYPERVISOR_xen_version(XENVER_version, NULL);
unsigned int ax, bx, cx, dx;
unsigned int xsave_mask;

@@ -286,7 +271,7 @@ static void __init xen_init_cpuid_mask(void)
(1 << (X86_FEATURE_OSXSAVE % 32));

/* Xen will set CR4.OSXSAVE if supported and not disabled by force */
- if (((cx & xsave_mask) != xsave_mask) || needs_xsave_quirk(version))
+ if ((cx & xsave_mask) != xsave_mask)
cpuid_leaf1_ecx_mask &= ~xsave_mask; /* disable XSAVE & OSXSAVE */
}

--
1.7.9.5


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 12:29 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org