From 415e6b0a686989d0000a82ba8404d4ab9cd1e6b7 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Tue, 21 Feb 2012 11:39:38 -0200 Subject: kernels/xe-guest-utilities --- kernels/xen/24344.patch | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 kernels/xen/24344.patch (limited to 'kernels/xen/24344.patch') diff --git a/kernels/xen/24344.patch b/kernels/xen/24344.patch new file mode 100644 index 000000000..642b90867 --- /dev/null +++ b/kernels/xen/24344.patch @@ -0,0 +1,33 @@ +--- a/tools/libxc/xc_cpuid_x86.c 2011-10-20 15:05:42.000000000 -0200 ++++ b/tools/libxc/xc_cpuid_x86.c 2012-02-15 00:01:46.307514813 -0200 +@@ -42,23 +42,23 @@ + static void cpuid(const unsigned int *input, unsigned int *regs) + { + unsigned int count = (input[1] == XEN_CPUID_INPUT_UNUSED) ? 0 : input[1]; +- asm ( + #ifdef __i386__ ++/* Use the stack to avoid reg constraint failures with some gcc flags */ ++ asm ( + "push %%ebx; push %%edx\n\t" +-#else +- "push %%rbx; push %%rdx\n\t" +-#endif + "cpuid\n\t" + "mov %%ebx,4(%4)\n\t" + "mov %%edx,12(%4)\n\t" +-#ifdef __i386__ + "pop %%edx; pop %%ebx\n\t" ++ : "=a" (regs[0]), "=c" (regs[2]) ++ : "0" (input[0]), "1" (count), "S" (regs) ++ : "memory" ); + #else +- "pop %%rdx; pop %%rbx\n\t" ++ asm ( ++ "cpuid" ++ : "=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" (regs[3]) ++ : "0" (input[0]), "2" (count) ); + #endif +- : "=a" (regs[0]), "=c" (regs[2]) +- : "0" (input[0]), "1" (count), "S" (regs) +- : "memory" ); + } -- cgit v1.2.3