diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-10-20 15:13:02 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-10-20 15:13:02 +0100 |
commit | 327b9bfff178cbabd66fa35d6cc2dc38935d31e4 (patch) | |
tree | 737e23832bbbff7a2c97c069bfeaf9f5f0deb799 | |
parent | c2a61a79bf8b05255ec191739e413af3e3e4218e (diff) | |
download | xen-327b9bfff178cbabd66fa35d6cc2dc38935d31e4.tar.gz xen-327b9bfff178cbabd66fa35d6cc2dc38935d31e4.tar.bz2 xen-327b9bfff178cbabd66fa35d6cc2dc38935d31e4.zip |
iommu: make some functions (mainly MSI-related) dummy on IA64 for now.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
-rw-r--r-- | xen/drivers/passthrough/io.c | 5 | ||||
-rw-r--r-- | xen/drivers/passthrough/pci.c | 5 | ||||
-rw-r--r-- | xen/drivers/passthrough/vtd/iommu.c | 8 | ||||
-rw-r--r-- | xen/drivers/passthrough/vtd/utils.c | 5 | ||||
-rw-r--r-- | xen/include/asm-x86/hvm/irq.h | 8 |
5 files changed, 30 insertions, 1 deletions
diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c index d5a337ab08..a74fcb2f89 100644 --- a/xen/drivers/passthrough/io.c +++ b/xen/drivers/passthrough/io.c @@ -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, unsigned int mirq) 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, int vector) spin_unlock(&d->event_lock); } +#endif void hvm_dpci_eoi(struct domain *d, unsigned int guest_gsi, union vioapic_redir_entry *ent) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index da39b475f2..72c123ada4 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -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 *d) } } +#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(void) return 0; } __initcall(setup_dump_pcidevs); - +#endif /* diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 6009871575..dd5d7a4e79 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -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 iommu *iommu, int vector) 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 iommu *iommu, int phy_cpu) 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 --git a/xen/drivers/passthrough/vtd/utils.c b/xen/drivers/passthrough/vtd/utils.c index 4404a1f1c1..c720030c0a 100644 --- a/xen/drivers/passthrough/vtd/utils.c +++ b/xen/drivers/passthrough/vtd/utils.c @@ -204,6 +204,7 @@ void print_vtd_entries(struct iommu *iommu, int bus, int devfn, u64 gmfn) 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 --git a/xen/include/asm-x86/hvm/irq.h b/xen/include/asm-x86/hvm/irq.h index 89a799f601..f2220526fd 100644 --- a/xen/include/asm-x86/hvm/irq.h +++ b/xen/include/asm-x86/hvm/irq.h @@ -102,4 +102,12 @@ struct hvm_irq { 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__ */ |