WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

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

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: Re: [Xen-ia64-devel] Cleanup for PV-on-HVM for IPF
From: DOI Tsunehisa <Doi.Tsunehisa@xxxxxxxxxxxxxx>
Date: Tue, 05 Sep 2006 08:19:03 +0900
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 04 Sep 2006 16:18:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1157402242.4667.18.camel@localhost>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <44FBDC83.2070602@xxxxxxxxxxxxxx> <1157402242.4667.18.camel@localhost>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)
Hi,

  Thank you for your comment.

Alex Williamson wrote:
> On Mon, 2006-09-04 at 16:57 +0900, DOI Tsunehisa wrote: 
>>  #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 */
> 
>    Typo, CONFIG_XEN_HVM_GUEST?  Personally I'd leave out the comment
> next to the #else and #endif for such a short block of code.

 Yes, it's typo. And I have removed the comment.

>>  #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);
> 
>    Isn't this going to be bad for the !CONFIG_XEN && !CONFIG_VMX_GUEST
> case?  I think we still want the old empty definition then.  Thanks,

  I agree. I have modified it.

Thanks,
- Tsunehisa Doi
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 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 Tue Sep 05 08:13:57 
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
 int ia64_xenmem_reservation_op(unsigned long op,
                   struct xen_memory_reservation* reservation__);
+#endif
 static inline int
 HYPERVISOR_memory_op(
     unsigned int cmd, void *arg)
diff -r 1bab7d65171b 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        Tue Sep 05 
08:13:57 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 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     Tue Sep 05 08:13:57 
2006 +0900
@@ -81,7 +81,11 @@ 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)
+#ifdef CONFIG_VMX_GUEST
+extern void xen_machphys_update(unsigned long mfn, unsigned long pfn);
+#else /* CONFIG_VMX_GUEST */
 #define xen_machphys_update(mfn, pfn) do { } while (0)
+#endif /* CONFIG_VMX_GUEST */
 
 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