[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] PV-on-HVM: A bit more re-jigging so the build gets further against



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1175854628 -3600
# Node ID 1cb39e8f1bfc521cc11e5b26b298b40087a29f7d
# Parent  ef33477324f669037a1b35b719fa0a01e98ec2f3
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@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h        |   36 
+++++-----
 linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h      |    8 +-
 unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h |    4 +
 unmodified_drivers/linux-2.6/platform-pci/platform-pci.c          |    4 -
 4 files changed, 30 insertions(+), 22 deletions(-)

diff -r ef33477324f6 -r 1cb39e8f1bfc 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h        Fri Apr 
06 10:15:31 2007 +0100
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h        Fri Apr 
06 11:17:08 2007 +0100
@@ -153,23 +153,6 @@ static inline paddr_t pte_machine_to_phy
 }
 #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 
 
 #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 */
diff -r ef33477324f6 -r 1cb39e8f1bfc 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h      Fri Apr 
06 10:15:31 2007 +0100
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h      Fri Apr 
06 11:17:08 2007 +0100
@@ -135,6 +135,9 @@ static inline paddr_t pte_machine_to_phy
        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_phy
 #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_phy
 #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 */
 
diff -r ef33477324f6 -r 1cb39e8f1bfc 
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
--- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Fri Apr 
06 10:15:31 2007 +0100
+++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Fri Apr 
06 11:17:08 2007 +0100
@@ -96,6 +96,10 @@ extern char *kasprintf(gfp_t gfp, const 
 #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
diff -r ef33477324f6 -r 1cb39e8f1bfc 
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c  Fri Apr 06 
10:15:31 2007 +0100
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c  Fri Apr 06 
11:17:08 2007 +0100
@@ -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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.