mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
hw/arm/virt: Let the virtio-iommu bypass MSIs
At the moment the virtio-iommu translates MSI transactions. This behavior is inherited from ARM SMMU. The virt machine code knows where the guest MSI doorbells are so we can easily declare those regions as VIRTIO_IOMMU_RESV_MEM_T_MSI. With that setting the guest will not map MSIs through the IOMMU and those transactions will be simply bypassed. Depending on which MSI controller is in use (ITS or GICV2M), we declare either: - the ITS interrupt translation space (ITS_base + 0x10000), containing the GITS_TRANSLATOR or - The GICV2M single frame, containing the MSI_SETSP_NS register. Signed-off-by: Eric Auger <eric.auger@redhat.com> Message-id: 20200629070404.10969-6-eric.auger@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
8077b8e549
commit
1b6f99d84f
2 changed files with 37 additions and 0 deletions
|
@ -96,6 +96,12 @@ typedef enum VirtIOMMUType {
|
|||
VIRT_IOMMU_VIRTIO,
|
||||
} VirtIOMMUType;
|
||||
|
||||
typedef enum VirtMSIControllerType {
|
||||
VIRT_MSI_CTRL_NONE,
|
||||
VIRT_MSI_CTRL_GICV2M,
|
||||
VIRT_MSI_CTRL_ITS,
|
||||
} VirtMSIControllerType;
|
||||
|
||||
typedef enum VirtGICType {
|
||||
VIRT_GIC_VERSION_MAX,
|
||||
VIRT_GIC_VERSION_HOST,
|
||||
|
@ -136,6 +142,7 @@ typedef struct {
|
|||
OnOffAuto acpi;
|
||||
VirtGICType gic_version;
|
||||
VirtIOMMUType iommu;
|
||||
VirtMSIControllerType msi_controller;
|
||||
uint16_t virtio_iommu_bdf;
|
||||
struct arm_boot_info bootinfo;
|
||||
MemMapEntry *memmap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue