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] hvm: Fix the realmode live migration issu

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvm: Fix the realmode live migration issue with Intel EPT
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Jun 2008 14:10:32 -0700
Delivery-date: Fri, 13 Jun 2008 14:11:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1213348405 -3600
# Node ID cb514522dab2a4c5453ce45bbd97f7b1c12449e0
# Parent  02b6977de4b5bcc173183e3f4aa836cd36f76160
hvm: Fix the realmode live migration issue with Intel EPT

The patch save/restore the HVM_PARAM_IDENT_PT parameter, then the live
migration during real mode with EPT may work fine.

Signed-off-by: Xiaohui Xin <Xiaohui.xin@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/libxc/xc_domain_restore.c |   16 ++++++++++++++++
 tools/libxc/xc_domain_save.c    |   19 +++++++++++++++++++
 2 files changed, 35 insertions(+)

diff -r 02b6977de4b5 -r cb514522dab2 tools/libxc/xc_domain_restore.c
--- a/tools/libxc/xc_domain_restore.c   Fri Jun 13 09:56:49 2008 +0100
+++ b/tools/libxc/xc_domain_restore.c   Fri Jun 13 10:13:25 2008 +0100
@@ -474,6 +474,22 @@ int xc_domain_restore(int xc_handle, int
             continue;
         }
 
+        if ( j == -3 )
+        {
+            uint64_t ident_pt;
+
+            /* Skip padding 4 bytes then read the EPT identity PT location. */
+            if ( read_exact(io_fd, &ident_pt, sizeof(uint32_t)) ||
+                 read_exact(io_fd, &ident_pt, sizeof(uint64_t)) )
+            {
+                ERROR("error read the address of the EPT identity map");
+                goto out;
+            }
+
+            xc_set_hvm_param(xc_handle, dom, HVM_PARAM_IDENT_PT, ident_pt);
+            continue;
+        }
+
         if ( j == 0 )
             break;  /* our work here is done */
 
diff -r 02b6977de4b5 -r cb514522dab2 tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c      Fri Jun 13 09:56:49 2008 +0100
+++ b/tools/libxc/xc_domain_save.c      Fri Jun 13 10:13:25 2008 +0100
@@ -1429,6 +1429,25 @@ int xc_domain_save(int xc_handle, int io
         }
     }
 
+    if ( hvm )
+    {
+        struct {
+            int minusthree;
+            uint32_t pad;
+            uint64_t ident_pt;
+        } chunk = { -3, 0 };
+
+        xc_get_hvm_param(xc_handle, dom, HVM_PARAM_IDENT_PT,
+                         (unsigned long *)&chunk.ident_pt);
+
+        if ( (chunk.ident_pt != 0) &&
+             write_exact(io_fd, &chunk, sizeof(chunk)) )
+        {
+            PERROR("Error when writing the ident_pt for EPT guest");
+            goto out;
+        }
+    }
+
     /* Zero terminate */
     i = 0;
     if ( write_exact(io_fd, &i, sizeof(int)) )

_______________________________________________
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] hvm: Fix the realmode live migration issue with Intel EPT, Xen patchbot-unstable <=