aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/hvm
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-07-16 11:52:38 +0200
committerJan Beulich <jbeulich@suse.com>2013-07-16 11:52:38 +0200
commit2ca9fbd739b8a72b16dd790d0fff7b75f5488fb8 (patch)
tree835ac39150e1a265bdb9d19f2f8d8ac3e91e6b9c /xen/include/asm-x86/hvm
parent3726b101a5cfb2614d3fa2d8be29d6e0b4032a6e (diff)
downloadxen-2ca9fbd739b8a72b16dd790d0fff7b75f5488fb8.tar.gz
xen-2ca9fbd739b8a72b16dd790d0fff7b75f5488fb8.tar.bz2
xen-2ca9fbd739b8a72b16dd790d0fff7b75f5488fb8.zip
AMD IOMMU: allocate IRTE entries instead of using a static mapping
For multi-vector MSI, where we surely don't want to allocate contiguous vectors and be able to set affinities of the individual vectors separately, we need to drop the use of the tuple of vector and delivery mode to determine the IRTE to use, and instead allocate IRTEs (which imo should have been done from the beginning). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Diffstat (limited to 'xen/include/asm-x86/hvm')
-rw-r--r--xen/include/asm-x86/hvm/svm/amd-iommu-defs.h4
-rw-r--r--xen/include/asm-x86/hvm/svm/amd-iommu-proto.h10
2 files changed, 7 insertions, 7 deletions
diff --git a/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h b/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h
index ab842ef69f..2ac6f75380 100644
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h
@@ -467,10 +467,6 @@
#define DEFAULT_DOMAIN_ADDRESS_WIDTH 48
/* interrupt remapping table */
-#define INT_REMAP_INDEX_DM_MASK 0x1C00
-#define INT_REMAP_INDEX_DM_SHIFT 10
-#define INT_REMAP_INDEX_VECTOR_MASK 0x3FC
-#define INT_REMAP_INDEX_VECTOR_SHIFT 2
#define INT_REMAP_ENTRY_REMAPEN_MASK 0x00000001
#define INT_REMAP_ENTRY_REMAPEN_SHIFT 0
#define INT_REMAP_ENTRY_SUPIOPF_MASK 0x00000002
diff --git a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
index bec2c84108..7736ff4d68 100644
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
@@ -89,10 +89,12 @@ struct amd_iommu *find_iommu_for_device(int seg, int bdf);
/* interrupt remapping */
int amd_iommu_setup_ioapic_remapping(void);
-void *amd_iommu_alloc_intremap_table(void);
+void *amd_iommu_alloc_intremap_table(unsigned long **);
int amd_iommu_free_intremap_table(u16 seg, struct ivrs_mappings *);
void amd_iommu_ioapic_update_ire(
unsigned int apic, unsigned int reg, unsigned int value);
+unsigned int amd_iommu_read_ioapic_from_ire(
+ unsigned int apic, unsigned int reg);
int amd_iommu_msi_msg_update_ire(
struct msi_desc *msi_desc, struct msi_msg *msg);
void amd_iommu_read_msi_from_ire(
@@ -101,15 +103,17 @@ int amd_setup_hpet_msi(struct msi_desc *msi_desc);
extern struct ioapic_sbdf {
u16 bdf, seg;
- unsigned long *pin_setup;
+ u16 *pin_2_idx;
} ioapic_sbdf[MAX_IO_APICS];
-extern void *shared_intremap_table;
extern struct hpet_sbdf {
u16 bdf, seg, id;
struct amd_iommu *iommu;
} hpet_sbdf;
+extern void *shared_intremap_table;
+extern unsigned long *shared_intremap_inuse;
+
/* power management support */
void amd_iommu_resume(void);
void amd_iommu_suspend(void);