summaryrefslogtreecommitdiff
path: root/kernels/xen/24344.patch
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-02-24 00:15:39 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-02-24 00:15:39 -0300
commit2050be76621e72c15b0e6547fa0b3e676319cf6c (patch)
tree75f8a4cd7df60691712fd1c4523220690de34ac4 /kernels/xen/24344.patch
parent8ce56f6ffc2826ca322adb4d0291152f9f5a69aa (diff)
parent42355452368e0a44d65d7a2d2128d21225d7ed2b (diff)
Merge branch 'master' of ssh://gparabola/abslibre
Diffstat (limited to 'kernels/xen/24344.patch')
-rw-r--r--kernels/xen/24344.patch33
1 files changed, 33 insertions, 0 deletions
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" );
+ }