direct-io.hg
changeset 14757:1cb39e8f1bfc
PV-on-HVM: A bit more re-jigging so the build gets further against
native Linux 2.6.5. It's not quite there still, but closer.
Signed-off-by: Keir Fraser <keir@xensource.com>
native Linux 2.6.5. It's not quite there still, but closer.
Signed-off-by: Keir Fraser <keir@xensource.com>
author | Keir Fraser <keir@xensource.com> |
---|---|
date | Fri Apr 06 11:17:08 2007 +0100 (2007-04-06) |
parents | ef33477324f6 |
children | 755207b3c47c |
files | linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h unmodified_drivers/linux-2.6/platform-pci/platform-pci.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h Fri Apr 06 10:15:31 2007 +0100 1.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h Fri Apr 06 11:17:08 2007 +0100 1.3 @@ -153,23 +153,6 @@ static inline paddr_t pte_machine_to_phy 1.4 } 1.5 #endif 1.6 1.7 -#else /* !CONFIG_XEN */ 1.8 - 1.9 -#define pfn_to_mfn(pfn) (pfn) 1.10 -#define mfn_to_pfn(mfn) (mfn) 1.11 -#define mfn_to_local_pfn(mfn) (mfn) 1.12 -#define set_phys_to_machine(pfn, mfn) ((void)0) 1.13 -#define phys_to_machine_mapping_valid(pfn) (1) 1.14 -#define phys_to_machine(phys) ((maddr_t)(phys)) 1.15 -#define machine_to_phys(mach) ((paddr_t)(mach)) 1.16 - 1.17 -#endif /* !CONFIG_XEN */ 1.18 - 1.19 -/* VIRT <-> MACHINE conversion */ 1.20 -#define virt_to_machine(v) (phys_to_machine(__pa(v))) 1.21 -#define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT)) 1.22 -#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) 1.23 - 1.24 #ifdef CONFIG_X86_PAE 1.25 static inline pte_t pfn_pte_ma(unsigned long page_nr, pgprot_t pgprot) 1.26 { 1.27 @@ -188,4 +171,23 @@ static inline pte_t pfn_pte_ma(unsigned 1.28 1.29 #define __pte_ma(x) ((pte_t) { (x) } ) 1.30 1.31 +#else /* !CONFIG_XEN */ 1.32 + 1.33 +#define pfn_to_mfn(pfn) (pfn) 1.34 +#define mfn_to_pfn(mfn) (mfn) 1.35 +#define mfn_to_local_pfn(mfn) (mfn) 1.36 +#define set_phys_to_machine(pfn, mfn) ((void)0) 1.37 +#define phys_to_machine_mapping_valid(pfn) (1) 1.38 +#define phys_to_machine(phys) ((maddr_t)(phys)) 1.39 +#define machine_to_phys(mach) ((paddr_t)(mach)) 1.40 +#define pfn_pte_ma(pfn, prot) pfn_pte(pfn, prot) 1.41 +#define __pte_ma(x) __pte(x) 1.42 + 1.43 +#endif /* !CONFIG_XEN */ 1.44 + 1.45 +/* VIRT <-> MACHINE conversion */ 1.46 +#define virt_to_machine(v) (phys_to_machine(__pa(v))) 1.47 +#define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT)) 1.48 +#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) 1.49 + 1.50 #endif /* _I386_MADDR_H */
2.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h Fri Apr 06 10:15:31 2007 +0100 2.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h Fri Apr 06 11:17:08 2007 +0100 2.3 @@ -135,6 +135,9 @@ static inline paddr_t pte_machine_to_phy 2.4 return phys; 2.5 } 2.6 2.7 +#define __pte_ma(x) ((pte_t) { (x) } ) 2.8 +#define pfn_pte_ma(pfn, prot) __pte_ma((((pfn) << PAGE_SHIFT) | pgprot_val(prot)) & __supported_pte_mask) 2.9 + 2.10 #else /* !CONFIG_XEN */ 2.11 2.12 #define pfn_to_mfn(pfn) (pfn) 2.13 @@ -144,6 +147,8 @@ static inline paddr_t pte_machine_to_phy 2.14 #define phys_to_machine_mapping_valid(pfn) (1) 2.15 #define phys_to_machine(phys) ((maddr_t)(phys)) 2.16 #define machine_to_phys(mach) ((paddr_t)(mach)) 2.17 +#define pfn_pte_ma(pfn, prot) pfn_pte(pfn, prot) 2.18 +#define __pte_ma(x) __pte(x) 2.19 2.20 #endif /* !CONFIG_XEN */ 2.21 2.22 @@ -152,8 +157,5 @@ static inline paddr_t pte_machine_to_phy 2.23 #define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT)) 2.24 #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) 2.25 2.26 -#define __pte_ma(x) ((pte_t) { (x) } ) 2.27 -#define pfn_pte_ma(pfn, prot) __pte_ma((((pfn) << PAGE_SHIFT) | pgprot_val(prot)) & __supported_pte_mask) 2.28 - 2.29 #endif /* _X86_64_MADDR_H */ 2.30
3.1 --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Fri Apr 06 10:15:31 2007 +0100 3.2 +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Fri Apr 06 11:17:08 2007 +0100 3.3 @@ -96,6 +96,10 @@ extern char *kasprintf(gfp_t gfp, const 3.4 #define handle_sysrq(x,y,z) handle_sysrq(x,y) 3.5 #endif 3.6 3.7 +#if defined(_PAGE_PRESENT) && !defined(_PAGE_NX) 3.8 +#define _PAGE_NX 0 3.9 +#endif 3.10 + 3.11 /* 3.12 * This variable at present is referenced by netfront, but only in code that 3.13 * is dead when running in hvm guests. To detect potential active uses of it
4.1 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Fri Apr 06 10:15:31 2007 +0100 4.2 +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Fri Apr 06 11:17:08 2007 +0100 4.3 @@ -1,6 +1,6 @@ 4.4 /****************************************************************************** 4.5 - * evtchn-pci.c 4.6 - * xen event channel fake PCI device driver 4.7 + * platform-pci.c 4.8 + * Xen platform PCI device driver 4.9 * Copyright (C) 2005, Intel Corporation. 4.10 * 4.11 * This program is free software; you can redistribute it and/or modify it