Skip to contentSkip to conversation

HVM save/restore clean up: enable 64 guest on 64 HV

PATCH New Zhai, Edwin 1 participant 1 message Jan 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 HVM save/restore clean up: enable 64 guest on 64 HV

[PATCH 4/4] HVM save/restore clean up: enable 64 guest on 64 HV

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.

xen/arch/x86/mm/shadow/common.c +2 -3
diff -r a4373c8e7e2d xen/arch/x86/mm/shadow/common.c
@@ -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);
             }