Received: from eggs.gnu.org ([2001:4830:134:3::10]:50990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjOBY-0002Td-BC for qemu-devel@nongnu.org; Mon, 12 Sep 2016 06:09:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjOBS-0004ab-Bu for qemu-devel@nongnu.org; Mon, 12 Sep 2016 06:09:55 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjOBS-0004SQ-5r for qemu-devel@nongnu.org; Mon, 12 Sep 2016 06:09:50 -0400 Received: by mail-wm0-f65.google.com with SMTP id g141so1849888wmd.1 for ; Mon, 12 Sep 2016 03:09:29 -0700 (PDT) From: David Kiarie Date: Mon, 12 Sep 2016 13:08:03 +0300 Message-Id: <1473674889-2727-1-git-send-email-davidkiarie4@gmail.com> Subject: [Qemu-devel] [v4 0/6] AMD IOMMU Interrupt remapping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jan.kiszka@web.de, mst@redhat.com, rkrcmar@redhat.com, peterx@redhat.com, ehabkost@redhat.com, pbonzini@redhat.com, alex.williamson@redhat.com, David Kiarie Hello, This patchset adds AMD IOMMU interrupt remapping logic to Qemu. I have made some changes to the way X86 Qemu manages MSI routes. The current code assumes that MSI routes are affiliated to a PCI device which will not always be the case with split irqchip. With split irqchip platform devices, in our case IOAPIC should be able to make interrupt requests via KVM. That being said, we not have IOMMU interrupt remapping and these platform devices will be expected to make interrupt requests using an explicit SID. I have therefore made some changes so that MSI routes are affiliated to a Requester ID and a PCI device if one is present. This patchset builds ontop of the AMD IOMMU patchset but is available here[1] for quick testing. https://github.com/aslaq/qemu IR David Kiarie (6): hw/msi: Allow platform devices to use explicit SID hw/i386: enforce SID verification hw/iommu: Prepare for AMD IOMMU interrupt remapping hw/iommu: AMD IOMMU interrupt remapping hw/acpi: report IOAPIC on IVRS hw/iommu: share common code between IOMMUs hw/i386/acpi-build.c | 2 + hw/i386/amd_iommu.c | 240 +++++++++++++++++++++++++++++++++++++- hw/i386/amd_iommu.h | 82 +++++++++++++ hw/i386/intel_iommu.c | 89 +++++++------- hw/i386/kvm/pci-assign.c | 12 +- hw/i386/trace-events | 7 ++ hw/i386/x86-iommu.c | 8 ++ hw/intc/ioapic.c | 30 ++++- hw/misc/ivshmem.c | 6 +- hw/vfio/pci.c | 6 +- hw/virtio/virtio-pci.c | 7 +- include/hw/i386/ioapic_internal.h | 1 + include/hw/i386/x86-iommu.h | 1 + include/sysemu/kvm.h | 25 ++-- kvm-all.c | 10 +- kvm-stub.c | 5 +- qemu-version.h | 1 + target-i386/kvm.c | 15 ++- 18 files changed, 461 insertions(+), 86 deletions(-) create mode 100644 qemu-version.h -- 2.1.4