aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/paging.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-01-27 16:02:21 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-01-27 16:02:21 +0000
commit2d0557c5cbeb7ab5de618dc09750a376c9c87405 (patch)
tree9f418afa8810fc31396b46023110a334d5a30dbe /xen/include/asm-x86/paging.h
parent800dcd89f7cba65e330858ebd6a55dc035f21ef1 (diff)
downloadxen-2d0557c5cbeb7ab5de618dc09750a376c9c87405.tar.gz
xen-2d0557c5cbeb7ab5de618dc09750a376c9c87405.tar.bz2
xen-2d0557c5cbeb7ab5de618dc09750a376c9c87405.zip
x86: Fold page_info lock into type_info.
Fix some racey looking code at the same time. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/include/asm-x86/paging.h')
-rw-r--r--xen/include/asm-x86/paging.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/xen/include/asm-x86/paging.h b/xen/include/asm-x86/paging.h
index d3970f1f82..11e96ee957 100644
--- a/xen/include/asm-x86/paging.h
+++ b/xen/include/asm-x86/paging.h
@@ -336,7 +336,7 @@ void paging_dump_vcpu_info(struct vcpu *v);
* Access to the guest pagetables */
/* Get a mapping of a PV guest's l1e for this virtual address. */
-static inline void *
+static inline l1_pgentry_t *
guest_map_l1e(struct vcpu *v, unsigned long addr, unsigned long *gl1mfn)
{
l2_pgentry_t l2e;
@@ -354,15 +354,14 @@ guest_map_l1e(struct vcpu *v, unsigned long addr, unsigned long *gl1mfn)
!= _PAGE_PRESENT )
return NULL;
*gl1mfn = l2e_get_pfn(l2e);
- return &__linear_l1_table[l1_linear_offset(addr)];
+ return (l1_pgentry_t *)map_domain_page(*gl1mfn) + l1_table_offset(addr);
}
/* Pull down the mapping we got from guest_map_l1e() */
static inline void
guest_unmap_l1e(struct vcpu *v, void *p)
{
- if ( unlikely(paging_mode_translate(v->domain)) )
- unmap_domain_page(p);
+ unmap_domain_page(p);
}
/* Read the guest's l1e that maps this address. */