]> xenbits.xensource.com Git - xen.git/commitdiff
PV-on-HVM: A bit more re-jigging so the build gets further against
authorKeir Fraser <keir@xensource.com>
Fri, 6 Apr 2007 10:17:08 +0000 (11:17 +0100)
committerKeir Fraser <keir@xensource.com>
Fri, 6 Apr 2007 10:17:08 +0000 (11:17 +0100)
native Linux 2.6.5. It's not quite there still, but closer.
Signed-off-by: Keir Fraser <keir@xensource.com>
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

index 0f50556dd4d60c9723e97170283dc7aa1b67df66..4ded6ed842d438d98782cd29ce2b1e701f2e9dff 100644 (file)
@@ -153,23 +153,6 @@ static inline paddr_t pte_machine_to_phys(maddr_t machine)
 }
 #endif
 
-#else /* !CONFIG_XEN */
-
-#define pfn_to_mfn(pfn) (pfn)
-#define mfn_to_pfn(mfn) (mfn)
-#define mfn_to_local_pfn(mfn) (mfn)
-#define set_phys_to_machine(pfn, mfn) ((void)0)
-#define phys_to_machine_mapping_valid(pfn) (1)
-#define phys_to_machine(phys) ((maddr_t)(phys))
-#define machine_to_phys(mach) ((paddr_t)(mach))
-
-#endif /* !CONFIG_XEN */
-
-/* VIRT <-> MACHINE conversion */
-#define virt_to_machine(v)     (phys_to_machine(__pa(v)))
-#define virt_to_mfn(v)         (pfn_to_mfn(__pa(v) >> PAGE_SHIFT))
-#define mfn_to_virt(m)         (__va(mfn_to_pfn(m) << PAGE_SHIFT))
-
 #ifdef CONFIG_X86_PAE
 static inline pte_t pfn_pte_ma(unsigned long page_nr, pgprot_t pgprot)
 {
@@ -188,4 +171,23 @@ static inline pte_t pfn_pte_ma(unsigned long page_nr, pgprot_t pgprot)
 
 #define __pte_ma(x)    ((pte_t) { (x) } )
 
+#else /* !CONFIG_XEN */
+
+#define pfn_to_mfn(pfn) (pfn)
+#define mfn_to_pfn(mfn) (mfn)
+#define mfn_to_local_pfn(mfn) (mfn)
+#define set_phys_to_machine(pfn, mfn) ((void)0)
+#define phys_to_machine_mapping_valid(pfn) (1)
+#define phys_to_machine(phys) ((maddr_t)(phys))
+#define machine_to_phys(mach) ((paddr_t)(mach))
+#define pfn_pte_ma(pfn, prot) pfn_pte(pfn, prot)
+#define __pte_ma(x) __pte(x)
+
+#endif /* !CONFIG_XEN */
+
+/* VIRT <-> MACHINE conversion */
+#define virt_to_machine(v)     (phys_to_machine(__pa(v)))
+#define virt_to_mfn(v)         (pfn_to_mfn(__pa(v) >> PAGE_SHIFT))
+#define mfn_to_virt(m)         (__va(mfn_to_pfn(m) << PAGE_SHIFT))
+
 #endif /* _I386_MADDR_H */
index cefd6e0b61bf77bb4a957b493bab6aa5c1d56284..0524e2cc2d32ac348d979367e526e4a76342a66e 100644 (file)
@@ -135,6 +135,9 @@ static inline paddr_t pte_machine_to_phys(maddr_t machine)
        return phys;
 }
 
+#define __pte_ma(x)     ((pte_t) { (x) } )
+#define pfn_pte_ma(pfn, prot)  __pte_ma((((pfn) << PAGE_SHIFT) | pgprot_val(prot)) & __supported_pte_mask)
+
 #else /* !CONFIG_XEN */
 
 #define pfn_to_mfn(pfn) (pfn)
@@ -144,6 +147,8 @@ static inline paddr_t pte_machine_to_phys(maddr_t machine)
 #define phys_to_machine_mapping_valid(pfn) (1)
 #define phys_to_machine(phys) ((maddr_t)(phys))
 #define machine_to_phys(mach) ((paddr_t)(mach))
+#define pfn_pte_ma(pfn, prot) pfn_pte(pfn, prot)
+#define __pte_ma(x) __pte(x)
 
 #endif /* !CONFIG_XEN */
 
@@ -152,8 +157,5 @@ static inline paddr_t pte_machine_to_phys(maddr_t machine)
 #define virt_to_mfn(v)         (pfn_to_mfn(__pa(v) >> PAGE_SHIFT))
 #define mfn_to_virt(m)         (__va(mfn_to_pfn(m) << PAGE_SHIFT))
 
-#define __pte_ma(x)     ((pte_t) { (x) } )
-#define pfn_pte_ma(pfn, prot)  __pte_ma((((pfn) << PAGE_SHIFT) | pgprot_val(prot)) & __supported_pte_mask)
-
 #endif /* _X86_64_MADDR_H */
 
index f6a93710342c741e8c0427bdbf8273d31a0aa627..1f604a0e1ae92b233e2a5445c56d0bdbf9052fc7 100644 (file)
@@ -96,6 +96,10 @@ extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
 #define handle_sysrq(x,y,z) handle_sysrq(x,y)
 #endif
 
+#if defined(_PAGE_PRESENT) && !defined(_PAGE_NX)
+#define _PAGE_NX 0
+#endif
+
 /*
  * This variable at present is referenced by netfront, but only in code that
  * is dead when running in hvm guests. To detect potential active uses of it
index 8e69557ac8f9bc35f3f1c84a52ca4aa76a477ddd..2451b7c6ce1c63dbae0b18f70b169c8834bdf5aa 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
- * evtchn-pci.c
- * xen event channel fake PCI device driver
+ * platform-pci.c
+ * Xen platform PCI device driver
  * Copyright (C) 2005, Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it