[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix NORMAL_PT_UPDATE for PAE when page is not pinned.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID bd5533956fb03a3c2b3a8d0b96ce64175fd3f6d4 # Parent 349c15288793b704c06f0dfb791b7799eb90a695 Fix NORMAL_PT_UPDATE for PAE when page is not pinned. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r 349c15288793 -r bd5533956fb0 xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c Sat Aug 20 11:51:50 2005 +++ b/xen/arch/x86/mm.c Sat Aug 20 20:05:21 2005 @@ -2176,7 +2176,7 @@ } } - *(unsigned long *)va = req.val; + *(intpte_t *)va = req.val; okay = 1; if ( shadow_mode_enabled(d) ) @@ -2386,7 +2386,7 @@ } /* Delete pagetable entry. */ - if ( unlikely(__put_user(0, (unsigned long *)va))) + if ( unlikely(__put_user(0, (intpte_t *)va))) { DPRINTK("Cannot delete PTE entry at %p.\n", va); put_page_type(page); @@ -2446,12 +2446,11 @@ int clear_grant_va_mapping(unsigned long addr, unsigned long frame) { - l1_pgentry_t *pl1e; - unsigned long _ol1e; + l1_pgentry_t *pl1e, ol1e; pl1e = &linear_pg_table[l1_linear_offset(addr)]; - if ( unlikely(__get_user(_ol1e, (unsigned long *)pl1e) != 0) ) + if ( unlikely(__get_user(ol1e.l1, &pl1e->l1) != 0) ) { DPRINTK("Could not find PTE entry for address %lx\n", addr); return GNTST_general_error; @@ -2461,15 +2460,15 @@ * Check that the virtual address supplied is actually mapped to * frame. */ - if ( unlikely((_ol1e >> PAGE_SHIFT) != frame )) + if ( unlikely(l1e_get_pfn(ol1e) != frame) ) { DPRINTK("PTE entry %lx for address %lx doesn't match frame %lx\n", - _ol1e, addr, frame); + l1e_get_pfn(ol1e), addr, frame); return GNTST_general_error; } /* Delete pagetable entry. */ - if ( unlikely(__put_user(0, (unsigned long *)pl1e))) + if ( unlikely(__put_user(0, &pl1e->l1)) ) { DPRINTK("Cannot delete PTE entry at %p.\n", (unsigned long *)pl1e); return GNTST_general_error; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |