From: Jean Guyader <jean.guyader@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] hvm: live migration between intel and amd
Date: Fri, 13 Jun 2008 16:46:22 +0100 [thread overview]
Message-ID: <4852964E.9010700@eu.citrix.com> (raw)
[-- 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
next reply other threads:[~2008-06-13 15:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 15:46 Jean Guyader [this message]
2008-06-13 16:08 ` [PATCH] hvm: live migration between intel and amd Keir Fraser
2008-06-16 13:32 ` Jean Guyader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4852964E.9010700@eu.citrix.com \
--to=jean.guyader@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.