Skip to contentSkip to conversation

iommu/vt-d: Don't store SIRTP request

PATCH Applied Jan Kiszka 2 participants 2 messages Aug 11, 2014 – Aug 19, 2014 IOMMU

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 iommu/vt-d: Don't store SIRTP request

Don't store the SIRTP request bit in the register state. It will otherwise become sticky and could request an Interrupt Remap Table Pointer update on each command register write.

Found while starting to emulate IR in QEMU, not by observing problems on real hardware.

---
 drivers/iommu/intel_irq_remapping.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iommu/intel_irq_remapping.c +1 -2
index 0df41f6..a872874 100644
@@ -438,8 +438,7 @@ static void iommu_set_irq_remapping(struct intel_iommu *iommu, int mode)
 		    (addr) | IR_X2APIC_MODE(mode) | INTR_REMAP_TABLE_REG_SIZE);
 
 	/* Set interrupt-remapping table pointer */
-	iommu->gcmd |= DMA_GCMD_SIRTP;
-	writel(iommu->gcmd, iommu->reg + DMAR_GCMD_REG);
+	writel(iommu->gcmd | DMA_GCMD_SIRTP, iommu->reg + DMAR_GCMD_REG);
 
 	IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG,
 		      readl, (sts & DMA_GSTS_IRTPS), sts);
Signature · 1 line
1.8.1.1.298.ge7eed54
maintainer Applied
#1 lore raw
Quoted 11 lines · Jan Kiszka

Don't store the SIRTP request bit in the register state. It will otherwise become sticky and could request an Interrupt Remap Table Pointer update on each command register write.

Found while starting to emulate IR in QEMU, not by observing problems on real hardware.

---
 drivers/iommu/intel_irq_remapping.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks Jan.