Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup of linkage issues for non-Linux hosts
[palacios.git] / palacios / include / palacios / vmm_lowlevel.h
index af1f820..eec0d91 100644 (file)
@@ -70,9 +70,14 @@ static void __inline__ v3_cpuid(uint32_t target,
                                uint32_t * eax, uint32_t * ebx, 
                                uint32_t * ecx, uint32_t * edx) {
 #ifdef __V3_64BIT__
+    // avoid rbx on -FPIC - gcc likes to own rbx even on 64 bit PIC code
     __asm__ __volatile__ (
+                         "pushq %%rbx\n\t"
+                         "movq %%rdi, %%rbx\n\t"
                          "cpuid\n\t"
-                         : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
+                         "movq %%rbx, %%rdi\n\t"
+                         "popq %%rbx\n\t"
+                         : "=a" (*eax), "=D" (*ebx), "=c" (*ecx), "=d" (*edx)
                          : "0" (target), "2" (*ecx)
                          );
 #elif __V3_32BIT__