[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Clean up the domain_page.h interfaces. One common header file
ChangeSet 1.1689, 2005/06/07 12:46:09+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx Clean up the domain_page.h interfaces. One common header file <xen/domain_page.h> and map_domain_mem() -> map_domain_page(), takes a pfn rather than a paddr. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> b/xen/arch/ia64/dom0_ops.c | 3 b/xen/arch/ia64/pdb-stub.c | 2 b/xen/arch/x86/audit.c | 16 +- b/xen/arch/x86/dom0_ops.c | 2 b/xen/arch/x86/mm.c | 81 ++++++----- b/xen/arch/x86/setup.c | 2 b/xen/arch/x86/shadow.c | 183 +++++++++++++------------- b/xen/arch/x86/traps.c | 2 b/xen/arch/x86/vmx.c | 16 +- b/xen/arch/x86/vmx_platform.c | 40 ++--- b/xen/arch/x86/vmx_vmcs.c | 28 ++-- b/xen/arch/x86/x86_32/domain_page.c | 15 +- b/xen/arch/x86/x86_32/mm.c | 4 b/xen/common/dom0_ops.c | 6 b/xen/common/dom_mem_ops.c | 1 b/xen/common/domain.c | 4 b/xen/common/page_alloc.c | 10 - b/xen/include/asm-x86/config.h | 5 b/xen/include/asm-x86/shadow.h | 6 b/xen/include/xen/domain_page.h | 100 ++++++++++++++ b/xen/include/xen/perfc_defn.h | 215 ++++++++++++++++--------------- xen/include/asm-ia64/domain_page.h | 14 -- xen/include/asm-x86/domain_page.h | 5 xen/include/asm-x86/x86_32/domain_page.h | 85 ------------ xen/include/asm-x86/x86_64/domain_page.h | 21 --- 25 files changed, 428 insertions(+), 438 deletions(-) diff -Nru a/xen/arch/ia64/dom0_ops.c b/xen/arch/ia64/dom0_ops.c --- a/xen/arch/ia64/dom0_ops.c 2005-06-07 08:02:42 -04:00 +++ b/xen/arch/ia64/dom0_ops.c 2005-06-07 08:02:42 -04:00 @@ -13,12 +13,9 @@ #include <public/dom0_ops.h> #include <xen/sched.h> #include <xen/event.h> -#include <asm/domain_page.h> -//#include <asm/msr.h> #include <asm/pdb.h> #include <xen/trace.h> #include <xen/console.h> -//#include <xen/shadow.h> #include <public/sched_ctl.h> #define TRC_DOM0OP_ENTER_BASE 0x00020000 diff -Nru a/xen/arch/ia64/pdb-stub.c b/xen/arch/ia64/pdb-stub.c --- a/xen/arch/ia64/pdb-stub.c 2005-06-07 08:02:42 -04:00 +++ b/xen/arch/ia64/pdb-stub.c 2005-06-07 08:02:42 -04:00 @@ -14,8 +14,6 @@ #include <xen/sched.h> #include <asm/ptrace.h> #include <xen/keyhandler.h> -//#include <asm/apic.h> -#include <asm/domain_page.h> /* [un]map_domain_mem */ #include <asm/processor.h> #include <asm/pdb.h> #include <xen/list.h> diff -Nru a/xen/arch/x86/audit.c b/xen/arch/x86/audit.c --- a/xen/arch/x86/audit.c 2005-06-07 08:02:41 -04:00 +++ b/xen/arch/x86/audit.c 2005-06-07 08:02:41 -04:00 @@ -122,7 +122,7 @@ void adjust_l2_page(unsigned long mfn, int shadow) { - unsigned long *pt = map_domain_mem(mfn << PAGE_SHIFT); + unsigned long *pt = map_domain_page(mfn); int i; for ( i = 0; i < l2limit; i++ ) @@ -205,12 +205,12 @@ adjust(hl2page, 0); } - unmap_domain_mem(pt); + unmap_domain_page(pt); } void adjust_hl2_page(unsigned long hl2mfn) { - unsigned long *pt = map_domain_mem(hl2mfn << PAGE_SHIFT); + unsigned long *pt = map_domain_page(hl2mfn); int i; for ( i = 0; i < l2limit; i++ ) @@ -251,12 +251,12 @@ } } - unmap_domain_mem(pt); + unmap_domain_page(pt); } void adjust_l1_page(unsigned long l1mfn) { - unsigned long *pt = map_domain_mem(l1mfn << PAGE_SHIFT); + unsigned long *pt = map_domain_page(l1mfn); int i; for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ ) @@ -323,7 +323,7 @@ } } - unmap_domain_mem(pt); + unmap_domain_page(pt); } void adjust_shadow_tables() @@ -615,7 +615,7 @@ unsigned long mfn) { struct pfn_info *page = &frame_table[mfn]; - unsigned long *pt = map_domain_mem(mfn<<PAGE_SHIFT); + unsigned long *pt = map_domain_page(mfn); int i; for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ ) @@ -627,7 +627,7 @@ page->count_info, i, pt[i]); } - unmap_domain_mem(pt); + unmap_domain_page(pt); } void scan_for_pfn_in_grant_table(struct domain *d, unsigned xmfn) diff -Nru a/xen/arch/x86/dom0_ops.c b/xen/arch/x86/dom0_ops.c --- a/xen/arch/x86/dom0_ops.c 2005-06-07 08:02:41 -04:00 +++ b/xen/arch/x86/dom0_ops.c 2005-06-07 08:02:41 -04:00 @@ -13,7 +13,7 @@ #include <public/dom0_ops.h> #include <xen/sched.h> #include <xen/event.h> -#include <asm/domain_page.h> +#include <xen/domain_page.h> #include <asm/msr.h> #include <xen/trace.h> #include <xen/console.h> diff -Nru a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c 2005-06-07 08:02:41 -04:00 +++ b/xen/arch/x86/mm.c 2005-06-07 08:02:41 -04:00 @@ -94,12 +94,12 @@ #include <xen/perfc.h> #include <xen/irq.h> #include <xen/softirq.h> +#include <xen/domain_page.h> #include <asm/shadow.h> #include <asm/page.h> #include <asm/flushtlb.h> #include <asm/io.h> #include <asm/uaccess.h> -#include <asm/domain_page.h> #include <asm/ldt.h> #include <asm/x86_emulate.h> @@ -269,17 +269,17 @@ struct desc_struct *descs; int i; - descs = map_domain_mem((page-frame_table) << PAGE_SHIFT); + descs = map_domain_page(page_to_pfn(page)); for ( i = 0; i < 512; i++ ) if ( unlikely(!check_descriptor(&descs[i])) ) goto fail; - unmap_domain_mem(descs); + unmap_domain_page(descs); return 1; fail: - unmap_domain_mem(descs); + unmap_domain_page(descs); return 0; } @@ -665,14 +665,14 @@ ASSERT(!shadow_mode_refcounts(d)); - pl1e = map_domain_mem(pfn << PAGE_SHIFT); + pl1e = map_domain_page(pfn); for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ ) if ( is_guest_l1_slot(i) && unlikely(!get_page_from_l1e(pl1e[i], d)) ) goto fail; - unmap_domain_mem(pl1e); + unmap_domain_page(pl1e); return 1; fail: @@ -680,7 +680,7 @@ if ( is_guest_l1_slot(i) ) put_page_from_l1e(pl1e[i], d); - unmap_domain_mem(pl1e); + unmap_domain_page(pl1e); return 0; } @@ -699,7 +699,7 @@ return 0; } - pl2e = map_domain_mem(l3e_get_paddr(pl3e[3])); + pl2e = map_domain_page(l3e_get_pfn(pl3e[3])); for (i = 0; i < 4; i++) { vaddr = LINEAR_PT_VIRT_START + (i << L2_PAGETABLE_SHIFT); idx = (vaddr >> L2_PAGETABLE_SHIFT) & (L2_PAGETABLE_ENTRIES-1); @@ -709,7 +709,7 @@ } else pl2e[idx] = l2e_empty(); } - unmap_domain_mem(pl2e); + unmap_domain_page(pl2e); return 1; } @@ -749,7 +749,7 @@ ASSERT( !shadow_mode_refcounts(d) ); - pl2e = map_domain_mem(pfn << PAGE_SHIFT); + pl2e = map_domain_page(pfn); for ( i = 0; i < L2_PAGETABLE_ENTRIES; i++ ) { vaddr = i << L2_PAGETABLE_SHIFT; @@ -790,7 +790,7 @@ } #endif - unmap_domain_mem(pl2e); + unmap_domain_page(pl2e); return 1; fail: @@ -798,7 +798,7 @@ if ( is_guest_l2_slot(type, i) ) put_page_from_l2e(pl2e[i], pfn); - unmap_domain_mem(pl2e); + unmap_domain_page(pl2e); return 0; } @@ -815,7 +815,7 @@ ASSERT( !shadow_mode_refcounts(d) ); - pl3e = map_domain_mem(pfn << PAGE_SHIFT); + pl3e = map_domain_page(pfn); for ( i = 0; i < L3_PAGETABLE_ENTRIES; i++ ) { vaddr = i << L3_PAGETABLE_SHIFT; if ( is_guest_l3_slot(i) && @@ -825,7 +825,7 @@ if (!fixup_pae_linear_mappings(pl3e)) goto fail; - unmap_domain_mem(pl3e); + unmap_domain_page(pl3e); return 1; fail: @@ -833,7 +833,7 @@ if ( is_guest_l3_slot(i) ) put_page_from_l3e(pl3e[i], pfn); - unmap_domain_mem(pl3e); + unmap_domain_page(pl3e); return 0; } @@ -891,13 +891,13 @@ l1_pgentry_t *pl1e; int i; - pl1e = map_domain_mem(pfn << PAGE_SHIFT); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |