intel_iommu: Add support for PCI MSI remap
commit651e4cefeee8e388919e51f4e299033ab2a8b87d
authorPeter Xu <peterx@redhat.com>
Thu, 14 Jul 2016 05:56:22 +0000 (14 13:56 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 20 Jul 2016 16:31:04 +0000 (20 19:31 +0300)
treec9eb2dedbfb664eb17b89b2b9983febd081ee20f
parenta4ca297e848a3eda39acaec6941fed4eb35916df
intel_iommu: Add support for PCI MSI remap

This patch enables interrupt remapping for PCI devices.

To play the trick, one memory region "iommu_ir" is added as child region
of the original iommu memory region, covering range 0xfeeXXXXX (which is
the address range for APIC). All the writes to this range will be taken
as MSI, and translation is carried out only when IR is enabled.

Idea suggested by Paolo Bonzini.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/intel_iommu.c
hw/i386/intel_iommu_internal.h
include/hw/i386/intel_iommu.h