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-changelog

[Xen-changelog] [xen-unstable] x86 hvm: Allow restore of old images with

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 hvm: Allow restore of old images with different segment attribute format.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Feb 2009 07:50:10 -0800
Delivery-date: Fri, 13 Feb 2009 07:49:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1234517392 0
# Node ID e6f1c66874d55fcf76ebdd4130ba55a3c8952b55
# Parent  726b56720b16e5e0effe24fbddac78d8af4c2125
x86 hvm: Allow restore of old images with different segment attribute format.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)

diff -r 726b56720b16 -r e6f1c66874d5 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Fri Feb 13 11:23:16 2009 +0900
+++ b/xen/arch/x86/hvm/hvm.c    Fri Feb 13 09:29:52 2009 +0000
@@ -542,6 +542,22 @@ static int hvm_load_cpu_ctxt(struct doma
         return -EINVAL;
     }
 
+    /* Older Xen versions used to save the segment arbytes directly 
+     * from the VMCS on Intel hosts.  Detect this and rearrange them
+     * into the struct segment_register format. */
+#define UNFOLD_ARBYTES(_r)                          \
+    if ( (_r & 0xf000) && !(_r & 0x0f00) )          \
+        _r = ((_r & 0xff) | ((_r >> 4) & 0xf00))
+    UNFOLD_ARBYTES(ctxt.cs_arbytes);
+    UNFOLD_ARBYTES(ctxt.ds_arbytes);
+    UNFOLD_ARBYTES(ctxt.es_arbytes);
+    UNFOLD_ARBYTES(ctxt.fs_arbytes);
+    UNFOLD_ARBYTES(ctxt.gs_arbytes);
+    UNFOLD_ARBYTES(ctxt.ss_arbytes);
+    UNFOLD_ARBYTES(ctxt.tr_arbytes);
+    UNFOLD_ARBYTES(ctxt.ldtr_arbytes);
+#undef UNFOLD_ARBYTES
+
     /* Architecture-specific vmcs/vmcb bits */
     if ( hvm_funcs.load_cpu_ctxt(v, &ctxt) < 0 )
         return -EINVAL;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86 hvm: Allow restore of old images with different segment attribute format., Xen patchbot-unstable <=