[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 00/26] IOMMU: Enable interrupt remapping for
From: |
Radim Krčmář |
Subject: |
Re: [Qemu-devel] [PATCH v6 00/26] IOMMU: Enable interrupt remapping for Intel IOMMU |
Date: |
Mon, 9 May 2016 19:15:26 +0200 |
2016-05-05 11:25+0800, Peter Xu:
> Hi, all,
>
> This is v6 for Intel IOMMU IR support. This series introduced quite
> a few new patches based on v5. Sorry for that (Yes, Jan is
> contributing to it as well, though most of which are really good
> ideas for me :). Hopefully we can get its convergence in this
> version.
>
> To make the review easier, I tried to keep all the existing patches
> and indexes (also, this is easier for me too to do the
> modifications, and logically I feel this make more sense and clean,
> please let me know if I am wrong). Patches 1-18 are v5 patches, and
> patches 19-26 are newly added patches.
>
> All the new patches may need more review, many of them are outside
> Intel IOMMU scope, and touching other part of codes, which I am
> still not very sure about.
>
> Testing is only covering basic smoke test for the following matrix:
>
> - IR enabled/disable
> - kernel irqchip off/split
> - network device: tap with/without vhost, e1000
I noticed a bug with RHEL7 linux guest, 3.10.0-390.el7.x86_64.
Kernel complains about queued invalidation and fails to boot:
virtio-pci 0000:00:01.0: virtio_pci: leaving for legacy driver
DMAR-IR: Requested mask 1 exceeds the max invalidation handle mask value 0
DMAR-IR: Unable to allocate 2 IRTE for PCI 0000:00:01.0
DMAR-IR: Requested mask 1 exceeds the max invalidation handle mask value 0
DMAR-IR: Unable to allocate 2 IRTE for PCI 0000:00:01.0
dracut-initqueue[263]: Warning: dracut-initqueue timeout - starting timeout
scripts
dracut-initqueue[263]: Warning: Could not boot.
dracut-initqueue[263]: Warning: /dev/mapper/rhel-root does not exist
dracut-initqueue[263]: Warning: /dev/rhel/root does not exist
dracut-initqueue[263]: Warning: /dev/rhel/swap does not exist
The patch below helps,
---8<---
From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= <address@hidden>
Date: Mon, 9 May 2016 19:04:56 +0200
Subject: [PATCH] intel_iommu: support all masks in interrupt entry cache
invalidation
Linux guests do not gracefully handle cases when the invalidation mask
they wanted is not supported, probably because real hardware always
allowed all.
We can just say that all 16 masks are supported, because both
ioapic_iec_notifier and kvm_update_msi_routes_all invalidate all caches.
Signed-off-by: Radim Krčmář <address@hidden>
---
hw/i386/intel_iommu.c | 2 +-
hw/i386/intel_iommu_internal.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index d10064289551..be3647f6b006 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -2359,7 +2359,7 @@ static void vtd_init(IntelIOMMUState *s)
s->ecap = VTD_ECAP_QI | VTD_ECAP_IRO;
if (ms->iommu_intr) {
- s->ecap |= VTD_ECAP_IR | VTD_ECAP_EIM;
+ s->ecap |= VTD_ECAP_IR | VTD_ECAP_EIM | VTD_ECAP_MHVM;
}
vtd_reset_context_cache(s);
diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h
index 72b011492755..0829a5064f2c 100644
--- a/hw/i386/intel_iommu_internal.h
+++ b/hw/i386/intel_iommu_internal.h
@@ -186,6 +186,7 @@
/* Interrupt Remapping support */
#define VTD_ECAP_IR (1ULL << 3)
#define VTD_ECAP_EIM (1ULL << 4)
+#define VTD_ECAP_MHMV (15ULL << 20)
/* CAP_REG */
/* (offset >> 4) << 24 */
- [Qemu-devel] [PATCH v6 22/26] x86-iommu: replace existing VT-d hooks into X86 ones, (continued)
- [Qemu-devel] [PATCH v6 22/26] x86-iommu: replace existing VT-d hooks into X86 ones, Peter Xu, 2016/05/04
- [Qemu-devel] [PATCH v6 23/26] kvm-irqchip: simplify kvm_irqchip_add_msi_route, Peter Xu, 2016/05/04
- [Qemu-devel] [PATCH v6 25/26] kvm-irqchip: x86: add msi route notify fn, Peter Xu, 2016/05/04
- [Qemu-devel] [PATCH v6 26/26] kvm-irqchip: do explicit commit when update irq, Peter Xu, 2016/05/04
- [Qemu-devel] [PATCH v6 24/26] kvm-irqchip: i386: add hook for add/remove virq, Peter Xu, 2016/05/04
- Re: [Qemu-devel] [PATCH v6 00/26] IOMMU: Enable interrupt remapping for Intel IOMMU, Peter Xu, 2016/05/05
- Re: [Qemu-devel] [PATCH v6 00/26] IOMMU: Enable interrupt remapping for Intel IOMMU,
Radim Krčmář <=