aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/mm.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-01-23 14:13:41 +0100
committerJan Beulich <jbeulich@suse.com>2013-01-23 14:13:41 +0100
commitf697f2fc18f11c28cffc61f39025c3bfa92d376d (patch)
treee640615cef12e9e6c3400a2eabd570f19d4d078f /xen/arch/x86/mm.c
parentbcf557675d858e3b2e92788f5424ed4bfdac413d (diff)
downloadxen-f697f2fc18f11c28cffc61f39025c3bfa92d376d.tar.gz
xen-f697f2fc18f11c28cffc61f39025c3bfa92d376d.tar.bz2
xen-f697f2fc18f11c28cffc61f39025c3bfa92d376d.zip
x86: properly use map_domain_page() in miscellaneous places
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/mm.c')
-rw-r--r--xen/arch/x86/mm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 6706f1d3cc..a3c4b6bcbc 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -2538,14 +2538,18 @@ int new_guest_cr3(unsigned long mfn)
if ( is_pv_32on64_domain(d) )
{
+ unsigned long gt_mfn = pagetable_get_pfn(curr->arch.guest_table);
+ l4_pgentry_t *pl4e = map_domain_page(gt_mfn);
+
okay = paging_mode_refcounts(d)
? 0 /* Old code was broken, but what should it be? */
: mod_l4_entry(
- __va(pagetable_get_paddr(curr->arch.guest_table)),
+ pl4e,
l4e_from_pfn(
mfn,
(_PAGE_PRESENT|_PAGE_RW|_PAGE_USER|_PAGE_ACCESSED)),
- pagetable_get_pfn(curr->arch.guest_table), 0, 0, curr) == 0;
+ gt_mfn, 0, 0, curr) == 0;
+ unmap_domain_page(pl4e);
if ( unlikely(!okay) )
{
MEM_LOG("Error while installing new compat baseptr %lx", mfn);