[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] hvm: live migration between intel and amd



Hi,


This patch is to enable live migration (save/restore) between intel and amd processor. We need to downgrade the cpuid to make it look like a P3.

The downgrading don't induce any huge performance impacts (enclosed graphs of ddk build on windows 2k3, build -c -ZPM 3).

Please try it by yourself to give me some feedback.

Regards,

--
Jean Guyader

PNG image

diff -r ec56331c056a xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Thu Jun 12 16:34:25 2008 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Fri Jun 13 16:40:30 2008 +0100
@@ -614,6 +614,23 @@ static void vmx_load_cpu_state(struct vc
 {
 #ifdef __x86_64__
     struct vmx_msr_state *guest_state = &v->arch.hvm_vmx.msr_state;
+
+    /* Do we come from AMD processor ? */
+    if ( data->msr_flags == -1ULL )
+    {
+        data->msr_flags = 0x7ULL;
+
+        data->ldtr_limit = 0xffffffff;
+        data->ldtr_arbytes = 0xc00;
+
+        data->cs_arbytes = 0xc9b;
+
+        data->gs_limit = 0xffffffff;
+        data->gs_arbytes = 0xc00;
+
+        data->tr_arbytes = 0x8b;
+    }
+
 
     /* restore msrs */
     guest_state->flags = data->msr_flags;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.