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

[Xen-ia64-devel] Cleanup for PV-on-HVM for IPF



Hi all,

  I will post patche for PV-on-HVM on ia64 platform to cleanup for
common code modification minimized.

  These patch include:

   * cleanup.patch
     - ia64_xenmem_reservation_op() and is_running_on_xen() are
       macro-nize if CONFIG_VMX_GUEST is defined.
     - xen_machphys_update() is funcition-ize if CONFIG_VMX_GUEST
       is defined.

  We have tested compiling.

Thanks,
- Tsunehisa Doi
# HG changeset patch
# User Doi.Tsunehisa@xxxxxxxxxxxxxx
# Node ID 4a17792e0a5a05caad68244abfe09948a6f2d90d
# Parent  1bab7d65171b762bb3cf1ae426bc6c403f847ebf
Cleanup for PV-on-HVM on IPF

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@xxxxxxxxxxxxxx>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx>

diff -r 1bab7d65171b -r 4a17792e0a5a 
linux-2.6-xen-sparse/include/asm-ia64/hypercall.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h Fri Sep 01 13:04:02 
2006 -0600
+++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h Mon Sep 04 16:04:27 
2006 +0900
@@ -205,8 +205,12 @@ ____HYPERVISOR_memory_op(
 }
 
 #include <xen/interface/memory.h>
+#ifdef CONFIG_VMX_GUEST
+# define ia64_xenmem_reservation_op(op, xmr) (0)
+#else /* CONFIG_VMX_GUEST */
 int ia64_xenmem_reservation_op(unsigned long op,
                   struct xen_memory_reservation* reservation__);
+#endif /* CONFIG_XEN_HVM_GUEST */
 static inline int
 HYPERVISOR_memory_op(
     unsigned int cmd, void *arg)
diff -r 1bab7d65171b -r 4a17792e0a5a 
linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h        Fri Sep 01 
13:04:02 2006 -0600
+++ b/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h        Mon Sep 04 
16:04:27 2006 +0900
@@ -33,13 +33,17 @@
 #ifndef __HYPERVISOR_H__
 #define __HYPERVISOR_H__
 
-#if !defined(CONFIG_XEN) && !defined(CONFIG_VMX_GUEST)
-#define is_running_on_xen()                    (0)
-#define HYPERVISOR_ioremap(offset, size)       (offset)
-#else
+#ifdef CONFIG_XEN
 extern int running_on_xen;
 #define is_running_on_xen()                    (running_on_xen)
-#endif
+#else /* CONFIG_XEN */
+# ifdef CONFIG_VMX_GUEST
+#  define is_running_on_xen()                  (1)
+# else /* CONFIG_VMX_GUEST */
+#  define is_running_on_xen()                  (0)
+#  define HYPERVISOR_ioremap(offset, size)     (offset)
+# endif /* CONFIG_VMX_GUEST */
+#endif /* CONFIG_XEN */
 
 #if defined(CONFIG_XEN) || defined(CONFIG_VMX_GUEST)
 #include <linux/config.h>
diff -r 1bab7d65171b -r 4a17792e0a5a 
linux-2.6-xen-sparse/include/asm-ia64/maddr.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/maddr.h     Fri Sep 01 13:04:02 
2006 -0600
+++ b/linux-2.6-xen-sparse/include/asm-ia64/maddr.h     Mon Sep 04 16:04:27 
2006 +0900
@@ -60,6 +60,8 @@ mfn_to_local_pfn(unsigned long mfn)
        return pfn;
 }
 
+#define xen_machphys_update(mfn, pfn) do { } while (0)
+
 #else /* !CONFIG_XEN */
 
 #define pfn_to_mfn_for_dma(pfn) (pfn)
@@ -67,6 +69,8 @@ mfn_to_local_pfn(unsigned long mfn)
 #define phys_to_machine_for_dma(phys) (phys)
 #define machine_to_phys_for_dma(machine) (machine)
 #define mfn_to_local_pfn(mfn) (mfn)
+
+extern void xen_machphys_update(unsigned long mfn, unsigned long pfn);
 
 #endif /* !CONFIG_XEN */
 
@@ -81,7 +85,6 @@ mfn_to_local_pfn(unsigned long mfn)
 #define virt_to_machine(virt) __pa(virt) // for tpmfront.c
 
 #define set_phys_to_machine(pfn, mfn) do { } while (0)
-#define xen_machphys_update(mfn, pfn) do { } while (0)
 
 typedef unsigned long maddr_t; // to compile netback, netfront
 
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

 


Rackspace

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