diff options
-rw-r--r-- | xen/drivers/passthrough/amd/iommu_init.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c index b01e630ef3..ba86e1b3cf 100644 --- a/xen/drivers/passthrough/amd/iommu_init.c +++ b/xen/drivers/passthrough/amd/iommu_init.c @@ -636,6 +636,14 @@ static void iommu_check_event_log(struct amd_iommu *iommu) } } + /* + * Workaround for erratum787: + * Re-check to make sure the bit has been cleared. + */ + entry = readl(iommu->mmio_base + IOMMU_STATUS_MMIO_OFFSET); + if ( entry & IOMMU_STATUS_EVENT_LOG_INT_MASK ) + tasklet_schedule(&amd_iommu_irq_tasklet); + spin_unlock_irqrestore(&iommu->lock, flags); } @@ -717,6 +725,14 @@ static void iommu_check_ppr_log(struct amd_iommu *iommu) } } + /* + * Workaround for erratum787: + * Re-check to make sure the bit has been cleared. + */ + entry = readl(iommu->mmio_base + IOMMU_STATUS_MMIO_OFFSET); + if ( entry & IOMMU_STATUS_PPR_LOG_INT_MASK ) + tasklet_schedule(&amd_iommu_irq_tasklet); + spin_unlock_irqrestore(&iommu->lock, flags); } |