From: Tomasz Buchert <tomasz.buchert@inria.fr>
Date: Sat, 1 Feb 2014 14:26:41 +0100
Subject: This patch fixes a segfault on amd64 architecture.

---
 src/hd/hd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/hd/hd.c b/src/hd/hd.c
index 5f5e54e..67ed64e 100644
--- a/src/hd/hd.c
+++ b/src/hd/hd.c
@@ -3172,16 +3172,16 @@ int hd_is_xen(hd_data_t *hd_data)
     "mov %%edx,8(%%esi)\n\t"
     "pop %%ebx"
 #else
-    "push %%rbx\n\t"
+    "mov %%ebx,%%edi\n\t"
     "cpuid\n\t"
     "mov %%ebx,(%%rsi)\n\t"
     "mov %%ecx,4(%%rsi)\n\t"
     "mov %%edx,8(%%rsi)\n\t"
-    "pop %%rbx"
+    "mov %%edi,%%ebx\n\t"
 #endif
     : "=a" (u), "=c" (foo)
     : "a" (0x40000000), "c" (0), "S" (signature)
-    : "%edx"
+    : "%edx", "%edi"
   );
 
   signature[12] = 0;
