[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [HVM] Save/restore cleanups 06: Let dom0 change domU's paging mode
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |