All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hvm: live migration between intel and amd
@ 2008-06-13 15:46 Jean Guyader
  2008-06-13 16:08 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Jean Guyader @ 2008-06-13 15:46 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

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

[-- Attachment #2: live_migration_amd_intel.png --]
[-- Type: image/png, Size: 12011 bytes --]

[-- Attachment #3: live_migration_amd_intel.patch --]
[-- Type: text/plain, Size: 758 bytes --]

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;

[-- Attachment #4: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-16 13:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-13 15:46 [PATCH] hvm: live migration between intel and amd Jean Guyader
2008-06-13 16:08 ` Keir Fraser
2008-06-16 13:32   ` Jean Guyader

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.