aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2010-07-27 06:06:07 -0700
committerJohn Rigby <john.rigby@linaro.org>2011-03-16 15:46:27 -0600
commit0fb03bb8cb30f6b7b0e498a2c087324871a9fe8b (patch)
tree3e3a27a4ac54100632cf57a2eae2e77fc6f49a31 /arch
parent00e9362e24e7ce29a678e0d140f227ef1c2cd53d (diff)
UBUNTU: SAUCE: fix pv-ops for legacy Xen
Import fix_xen_guest_on_old_EC2.patch from fedora 14 Legacy hypervisors (RHEL 5.0 and RHEL 5.1) do not handle guest writes to cr4 gracefully. If a guest attempts to write a bit of cr4 that is unsupported, then the HV is so offended it crashes the domain. While later guest kernels (such as RHEL6) don't assume the HV supports all features, they do expect nicer responses. That assumption introduced code that probes whether or not xsave is supported early in the boot. So now when attempting to boot a RHEL6 guest on RHEL5.0 or RHEL5.1 an early crash will occur. This patch is quite obviously an undesirable hack. The real fix for this problem should be in the HV, and is, in later HVs. However, to support running on old HVs, RHEL6 can take this small change. No impact will occur for running on any RHEL HV (not even RHEL 5.5 supports xsave). There is only potential for guest performance loss on upstream Xen. All this by way of explanation for why is this patch not going upstream. Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/xen/enlighten.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 50542efe45fb..452298e23455 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -798,6 +798,7 @@ static void xen_write_cr4(unsigned long cr4)
{
cr4 &= ~X86_CR4_PGE;
cr4 &= ~X86_CR4_PSE;
+ cr4 &= ~X86_CR4_OSXSAVE;
native_write_cr4(cr4);
}