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-changelog

[Xen-changelog] [xen-unstable] iommu: make some functions (mainly MSI-re

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] iommu: make some functions (mainly MSI-related) dummy on IA64 for now.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Oct 2008 07:50:30 -0700
Delivery-date: Wed, 22 Oct 2008 07:51:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224511982 -3600
# Node ID e57ca7937ae8e6388c7a2ff56e3414feee9fd59e
# Parent  d8a156bdef14de7376dac61dd884fd1bd55e0c9a
iommu: make some functions (mainly MSI-related) dummy on IA64 for now.

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
 xen/drivers/passthrough/io.c        |    5 +++++
 xen/drivers/passthrough/pci.c       |    5 ++++-
 xen/drivers/passthrough/vtd/iommu.c |    8 ++++++++
 xen/drivers/passthrough/vtd/utils.c |    5 +++++
 xen/include/asm-x86/hvm/irq.h       |    8 ++++++++
 5 files changed, 30 insertions(+), 1 deletion(-)

diff -r d8a156bdef14 -r e57ca7937ae8 xen/drivers/passthrough/io.c
--- a/xen/drivers/passthrough/io.c      Mon Oct 20 15:11:41 2008 +0100
+++ b/xen/drivers/passthrough/io.c      Mon Oct 20 15:13:02 2008 +0100
@@ -20,6 +20,9 @@
 
 #include <xen/event.h>
 #include <xen/iommu.h>
+#include <asm/hvm/irq.h>
+#include <asm/hvm/iommu.h>
+#include <xen/hvm/irq.h>
 
 static void pt_irq_time_out(void *data)
 {
@@ -245,6 +248,7 @@ int hvm_do_IRQ_dpci(struct domain *d, un
     return 1;
 }
 
+#ifdef SUPPORT_MSI_REMAPPING
 void hvm_dpci_msi_eoi(struct domain *d, int vector)
 {
     struct hvm_irq_dpci *hvm_irq_dpci = d->arch.hvm_domain.irq.dpci;
@@ -277,6 +281,7 @@ void hvm_dpci_msi_eoi(struct domain *d, 
 
     spin_unlock(&d->event_lock);
 }
+#endif
 
 void hvm_dpci_eoi(struct domain *d, unsigned int guest_gsi,
                   union vioapic_redir_entry *ent)
diff -r d8a156bdef14 -r e57ca7937ae8 xen/drivers/passthrough/pci.c
--- a/xen/drivers/passthrough/pci.c     Mon Oct 20 15:11:41 2008 +0100
+++ b/xen/drivers/passthrough/pci.c     Mon Oct 20 15:13:02 2008 +0100
@@ -21,6 +21,8 @@
 #include <xen/list.h>
 #include <xen/prefetch.h>
 #include <xen/iommu.h>
+#include <asm/hvm/iommu.h>
+#include <asm/hvm/irq.h>
 #include <xen/delay.h>
 #include <xen/keyhandler.h>
 
@@ -207,6 +209,7 @@ void pci_release_devices(struct domain *
     }
 }
 
+#ifdef SUPPORT_MSI_REMAPPING
 static void dump_pci_devices(unsigned char ch)
 {
     struct pci_dev *pdev;
@@ -236,7 +239,7 @@ static int __init setup_dump_pcidevs(voi
     return 0;
 }
 __initcall(setup_dump_pcidevs);
-
+#endif
 
 
 /*
diff -r d8a156bdef14 -r e57ca7937ae8 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Mon Oct 20 15:11:41 2008 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c       Mon Oct 20 15:13:02 2008 +0100
@@ -24,6 +24,7 @@
 #include <xen/xmalloc.h>
 #include <xen/domain_page.h>
 #include <xen/iommu.h>
+#include <asm/hvm/iommu.h>
 #include <xen/numa.h>
 #include <xen/time.h>
 #include <xen/pci.h>
@@ -857,6 +858,7 @@ static void dma_msi_data_init(struct iom
     spin_unlock_irqrestore(&iommu->register_lock, flags);
 }
 
+#ifdef SUPPORT_MSI_REMAPPING
 static void dma_msi_addr_init(struct iommu *iommu, int phy_cpu)
 {
     u64 msi_address;
@@ -873,6 +875,12 @@ static void dma_msi_addr_init(struct iom
     dmar_writel(iommu->reg, DMAR_FEUADDR_REG, (u32)(msi_address >> 32));
     spin_unlock_irqrestore(&iommu->register_lock, flags);
 }
+#else
+static void dma_msi_addr_init(struct iommu *iommu, int phy_cpu)
+{
+    /* ia64: TODO */
+}
+#endif
 
 static void dma_msi_set_affinity(unsigned int vector, cpumask_t dest)
 {
diff -r d8a156bdef14 -r e57ca7937ae8 xen/drivers/passthrough/vtd/utils.c
--- a/xen/drivers/passthrough/vtd/utils.c       Mon Oct 20 15:11:41 2008 +0100
+++ b/xen/drivers/passthrough/vtd/utils.c       Mon Oct 20 15:13:02 2008 +0100
@@ -204,6 +204,7 @@ void print_vtd_entries(struct iommu *iom
 
 void dump_iommu_info(unsigned char key)
 {
+#if defined(__i386__) || defined(__x86_64__)
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;
     int i;
@@ -305,6 +306,10 @@ void dump_iommu_info(unsigned char key)
             }
         }
     }
+#else
+    printk("%s: not implemnted on IA64 for now.\n", __func__);
+    /* ia64: TODO */
+#endif
 }
 
 /*
diff -r d8a156bdef14 -r e57ca7937ae8 xen/include/asm-x86/hvm/irq.h
--- a/xen/include/asm-x86/hvm/irq.h     Mon Oct 20 15:11:41 2008 +0100
+++ b/xen/include/asm-x86/hvm/irq.h     Mon Oct 20 15:13:02 2008 +0100
@@ -102,4 +102,12 @@ struct hvm_intack hvm_vcpu_has_pending_i
 struct hvm_intack hvm_vcpu_has_pending_irq(struct vcpu *v);
 struct hvm_intack hvm_vcpu_ack_pending_irq(struct vcpu *v,
                                            struct hvm_intack intack);
+
+/*
+ * Currently IA64 Xen doesn't support MSI. So for x86, we define this macro
+ * to control the conditional compilation of some MSI-related functions.
+ * This macro will be removed once IA64 has MSI support.
+ */
+#define SUPPORT_MSI_REMAPPING 1
+
 #endif /* __ASM_X86_HVM_IRQ_H__ */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] iommu: make some functions (mainly MSI-related) dummy on IA64 for now., Xen patchbot-unstable <=