xen/22213-x86-xsave-cpuid-check.patch
Charles Arnold 08a77ed8c4 - fate#310510 - fix xenpaging
xenpaging.tools_xenpaging_cleanup.patch

- fate#310510 - fix xenpaging
  xenpaging.mem_event_check_ring-free_requests.patch

- install /etc/xen/examples/xentrace_formats.txt to get human readable
  tracedata if xenalyze is not used

- fate#310510 - fix xenpaging
  xenpaging.autostart_delay.patch
  xenpaging.blacklist.patch
  xenpaging.MRU_SIZE.patch
  remove xenpaging.hacks.patch, realmode works

- Upstream patches from Jan including fixes for the following bugs
  bnc#583568 - Xen kernel is not booting
  bnc#615206 - Xen kernel fails to boot with IO-APIC problem
  bnc#640773 - Xen kernel crashing right after grub
  bnc#643477 - issues with PCI hotplug/hotunplug to Xen driver domain
  22223-vtd-igd-workaround.patch
  22222-x86-timer-extint.patch
  22214-x86-msr-misc-enable.patch
  22213-x86-xsave-cpuid-check.patch
  22194-tmem-check-pv-mfn.patch
  22177-i386-irq-safe-map_domain_page.patch
  22175-x86-irq-enter-exit.patch
  22174-x86-pmtimer-accuracy.patch
  22160-Intel-C6-EOI.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=76
2010-10-20 21:00:35 +00:00

51 lines
1.6 KiB
Diff

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1285340011 -3600
# Node ID eb247ea9db8c8b541a7f8c9cdc51c064c4c9e41c
# Parent 105c938eacbbc250447a676bb2088f804033b82b
x86: check CPUID level before enabling xsave
References: bnc#640773
While not as relevant after c/s 21894, is still seems safer to check
the CPUID level here, just like Linux does. The is particularly
relevant for the 4.0 tree (which doesn't have said c/s), but also
possibly for nested environments where writing MSR_IA32_MISC_ENABLE
may not actually take effect (Xen itself ignores such writes).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- a/xen/arch/x86/i387.c
+++ b/xen/arch/x86/i387.c
@@ -132,6 +132,8 @@ void restore_fpu(struct vcpu *v)
}
}
+#define XSTATE_CPUID 0xd
+
/*
* Maximum size (in byte) of the XSAVE/XRSTOR save area required by all
* the supported and enabled features on the processor, including the
@@ -148,7 +150,12 @@ void xsave_init(void)
int cpu = smp_processor_id();
u32 min_size;
- cpuid_count(0xd, 0, &eax, &ebx, &ecx, &edx);
+ if ( boot_cpu_data.cpuid_level < XSTATE_CPUID ) {
+ printk(XENLOG_ERR "XSTATE_CPUID missing\n");
+ return;
+ }
+
+ cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx);
printk("%s: cpu%d: cntxt_max_size: 0x%x and states: %08x:%08x\n",
__func__, cpu, ecx, edx, eax);
@@ -169,7 +176,7 @@ void xsave_init(void)
*/
set_in_cr4(X86_CR4_OSXSAVE);
set_xcr0(eax & XCNTXT_MASK);
- cpuid_count(0xd, 0, &eax, &ebx, &ecx, &edx);
+ cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx);
clear_in_cr4(X86_CR4_OSXSAVE);
if ( cpu == 0 )