WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] hvm: live migration between intel and amd
From: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
Date: Fri, 13 Jun 2008 16:46:22 +0100
Delivery-date: Fri, 13 Jun 2008 08:47:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509)
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
<Prev in Thread] Current Thread [Next in Thread>