[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] VT-d: use qword MMIO access for MSI address writes
commit ae05fd3912b153e18efa3018d9f7cf9105ea5b43 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Jun 11 11:54:10 2015 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Jun 11 11:54:10 2015 +0200 VT-d: use qword MMIO access for MSI address writes Also make dmar_{read,write}q() actually do what their names suggest (we don't need to be concerned of 32-bit restrictions anymore). Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx> --- xen/drivers/passthrough/vtd/iommu.c | 3 +-- xen/drivers/passthrough/vtd/iommu.h | 15 ++++----------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 9053a1f..6ef5a80 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1054,8 +1054,7 @@ static void dma_msi_set_affinity(struct irq_desc *desc, const cpumask_t *mask) spin_lock_irqsave(&iommu->register_lock, flags); dmar_writel(iommu->reg, DMAR_FEDATA_REG, msg.data); - dmar_writel(iommu->reg, DMAR_FEADDR_REG, msg.address_lo); - dmar_writel(iommu->reg, DMAR_FEUADDR_REG, msg.address_hi); + dmar_writeq(iommu->reg, DMAR_FEADDR_REG, msg.address); spin_unlock_irqrestore(&iommu->register_lock, flags); } diff --git a/xen/drivers/passthrough/vtd/iommu.h b/xen/drivers/passthrough/vtd/iommu.h index 80f8830..fbcaa06 100644 --- a/xen/drivers/passthrough/vtd/iommu.h +++ b/xen/drivers/passthrough/vtd/iommu.h @@ -51,17 +51,10 @@ #define DMAR_IRTA_REG 0xB8 /* intr remap */ #define OFFSET_STRIDE (9) -#define dmar_readl(dmar, reg) readl(dmar + reg) -#define dmar_writel(dmar, reg, val) writel(val, dmar + reg) -#define dmar_readq(dmar, reg) ({ \ - u32 lo, hi; \ - lo = dmar_readl(dmar, reg); \ - hi = dmar_readl(dmar, reg + 4); \ - (((u64) hi) << 32) + lo; }) -#define dmar_writeq(dmar, reg, val) do {\ - dmar_writel(dmar, reg, (u32)val); \ - dmar_writel(dmar, reg + 4, (u32)((u64) val >> 32)); \ - } while (0) +#define dmar_readl(dmar, reg) readl((dmar) + (reg)) +#define dmar_readq(dmar, reg) readq((dmar) + (reg)) +#define dmar_writel(dmar, reg, val) writel(val, (dmar) + (reg)) +#define dmar_writeq(dmar, reg, val) writeq(val, (dmar) + (reg)) #define VER_MAJOR(v) (((v) & 0xf0) >> 4) #define VER_MINOR(v) ((v) & 0x0f) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |