No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: George Dunlap <george.dunlap@citrix.com>
free_domheap_page(page);
}
-void make_cr3(struct vcpu *v, unsigned long mfn)
+void make_cr3(struct vcpu *v, mfn_t mfn)
{
- v->arch.cr3 = mfn << PAGE_SHIFT;
+ v->arch.cr3 = mfn_x(mfn) << PAGE_SHIFT;
}
void write_ptbase(struct vcpu *v)
*/
void update_cr3(struct vcpu *v)
{
- unsigned long cr3_mfn;
+ mfn_t cr3_mfn;
if ( paging_mode_enabled(v->domain) )
{
}
if ( !(v->arch.flags & TF_kernel_mode) )
- cr3_mfn = pagetable_get_pfn(v->arch.guest_table_user);
+ cr3_mfn = pagetable_get_mfn(v->arch.guest_table_user);
else
- cr3_mfn = pagetable_get_pfn(v->arch.guest_table);
+ cr3_mfn = pagetable_get_mfn(v->arch.guest_table);
make_cr3(v, cr3_mfn);
}
{
mfn_t mmfn = hap_make_monitor_table(v);
v->arch.monitor_table = pagetable_from_mfn(mmfn);
- make_cr3(v, mfn_x(mmfn));
+ make_cr3(v, mmfn);
hvm_update_host_cr3(v);
}
{
mfn_t mmfn = v->arch.paging.mode->shadow.make_monitor_table(v);
v->arch.monitor_table = pagetable_from_mfn(mmfn);
- make_cr3(v, mfn_x(mmfn));
+ make_cr3(v, mmfn);
hvm_update_host_cr3(v);
}
/* Don't be running on the old monitor table when we
* pull it down! Switch CR3, and warn the HVM code that
* its host cr3 has changed. */
- make_cr3(v, mfn_x(new_mfn));
+ make_cr3(v, new_mfn);
if ( v == current )
write_ptbase(v);
hvm_update_host_cr3(v);
if ( v->arch.paging.mode )
v->arch.paging.mode->shadow.detach_old_tables(v);
if ( !(v->arch.flags & TF_kernel_mode) )
- make_cr3(v, pagetable_get_pfn(v->arch.guest_table_user));
+ make_cr3(v, pagetable_get_mfn(v->arch.guest_table_user));
else
- make_cr3(v, pagetable_get_pfn(v->arch.guest_table));
+ make_cr3(v, pagetable_get_mfn(v->arch.guest_table));
#if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)
{
///
if ( shadow_mode_external(d) )
{
- make_cr3(v, pagetable_get_pfn(v->arch.monitor_table));
+ make_cr3(v, pagetable_get_mfn(v->arch.monitor_table));
}
else // not shadow_mode_external...
{
v->arch.cr3 = virt_to_maddr(&v->arch.paging.shadow.l3table);
#else
/* 4-on-4: Just use the shadow top-level directly */
- make_cr3(v, pagetable_get_pfn(v->arch.shadow_table[0]));
+ make_cr3(v, pagetable_get_mfn(v->arch.shadow_table[0]));
#endif
}
#endif
int new_guest_cr3(mfn_t mfn);
-void make_cr3(struct vcpu *v, unsigned long mfn);
+void make_cr3(struct vcpu *v, mfn_t mfn);
void update_cr3(struct vcpu *v);
int vcpu_destroy_pagetables(struct vcpu *);
void *do_page_walk(struct vcpu *v, unsigned long addr);