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] Save/restore cleanups 06: Let dom0

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] Save/restore cleanups 06: Let dom0 change domU's paging mode
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 20 Jan 2007 09:10:19 -0800
Delivery-date: Sat, 20 Jan 2007 09:10:43 -0800
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 Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1169293252 0
# Node ID a514ae6bc1509cb2d58f8a06567d2a5ae322e6bf
# Parent  5dc5e6ba42d2b68edac47a39ac5e318ae1d76119
[HVM] Save/restore cleanups 06: Let dom0 change domU's paging mode

Signed-off-by: Zhai Edwin <edwin.zhai@xxxxxxxxx>
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff -r 5dc5e6ba42d2 -r a514ae6bc150 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Sat Jan 20 11:21:08 2007 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Sat Jan 20 11:40:52 2007 +0000
@@ -2569,12 +2569,15 @@ static void sh_update_paging_modes(struc
                 /* Need to make a new monitor table for the new mode */
                 mfn_t new_mfn, old_mfn;
 
-                if ( v != current ) 
+                if ( v != current && vcpu_runnable(v) ) 
                 {
                     SHADOW_ERROR("Some third party (d=%u v=%u) is changing "
-                                  "this HVM vcpu's (d=%u v=%u) paging mode!\n",
-                                  current->domain->domain_id, current->vcpu_id,
-                                  v->domain->domain_id, v->vcpu_id);
+                                 "this HVM vcpu's (d=%u v=%u) paging mode "
+                                 "while it is running.\n",
+                                 current->domain->domain_id, current->vcpu_id,
+                                 v->domain->domain_id, v->vcpu_id);
+                    /* It's not safe to do that because we can't change
+                     * the host CR£ for a running domain */
                     domain_crash(v->domain);
                     return;
                 }
@@ -2590,7 +2593,8 @@ static void sh_update_paging_modes(struc
                  * pull it down!  Switch CR3, and warn the HVM code that
                  * its host cr3 has changed. */
                 make_cr3(v, mfn_x(new_mfn));
-                write_ptbase(v);
+                if ( v == current )
+                    write_ptbase(v);
                 hvm_update_host_cr3(v);
                 old_mode->destroy_monitor_table(v, old_mfn);
             }

_______________________________________________
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] Save/restore cleanups 06: Let dom0 change domU's paging mode, Xen patchbot-unstable <=