mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
a4ca297e84
commit
651e4cefee
3 changed files with 307 additions and 0 deletions
|
@ -110,6 +110,8 @@
|
|||
/* Interrupt Address Range */
|
||||
#define VTD_INTERRUPT_ADDR_FIRST 0xfee00000ULL
|
||||
#define VTD_INTERRUPT_ADDR_LAST 0xfeefffffULL
|
||||
#define VTD_INTERRUPT_ADDR_SIZE (VTD_INTERRUPT_ADDR_LAST - \
|
||||
VTD_INTERRUPT_ADDR_FIRST + 1)
|
||||
|
||||
/* The shift of source_id in the key of IOTLB hash table */
|
||||
#define VTD_IOTLB_SID_SHIFT 36
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue