From: "Zhai, Edwin" Subject: [PATCH 4/4] HVM save/restore clean up: enable 64 guest on 64 HV Date: Sat, 20 Jan 2007 00:40:02 +0800 Message-ID: <20070119164002.GA29602@edwin-gen.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt , Keir Fraser , Tim Deegan Cc: xen-devel@lists.xensource.com, edwin.zhai@intel.com List-Id: xen-devel@lists.xenproject.org [PATCH 4/4] HVM save/restore clean up: enable 64 guest on 64 HV Signed-off-by: Zhai Edwin remove the assumption that sh_update_paging_modes only occur on current vcpu. 64b guest can be save/restored on 64b HV with this. need reconsider it for security. diff -r a4373c8e7e2d xen/arch/x86/mm/shadow/common.c --- a/xen/arch/x86/mm/shadow/common.c Fri Jan 19 19:40:12 2007 +0800 +++ b/xen/arch/x86/mm/shadow/common.c Fri Jan 19 19:42:42 2007 +0800 @@ -2575,8 +2575,6 @@ static void sh_update_paging_modes(struc "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); - domain_crash(v->domain); - return; } old_mfn = pagetable_get_mfn(v->arch.monitor_table); @@ -2590,7 +2588,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); }