diff options
| author | Jason Wang <jasowang@redhat.com> | 2022-02-14 14:03:46 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2022-03-06 05:08:23 -0500 |
| commit | b8ffd7d6713fb2703f4b09cea3e62d1c61767107 (patch) | |
| tree | c4d35897c53f09c81366f67f682be60be2b5d13c /include/hw/i386 | |
| parent | b1f030a0a2e281193b09350c0281c0084e84bcf4 (diff) | |
| download | focaccia-qemu-b8ffd7d6713fb2703f4b09cea3e62d1c61767107.tar.gz focaccia-qemu-b8ffd7d6713fb2703f4b09cea3e62d1c61767107.zip | |
intel_iommu: support snoop control
SC is required for some kernel features like vhost-vDPA. So this patch implements basic SC feature. The idea is pretty simple, for software emulated DMA it would be always coherent. In this case we can simple advertise ECAP_SC bit. For VFIO and vhost, thing will be more much complicated, so this patch simply fail the IOMMU notifier registration. In the future, we may want to have a dedicated notifiers flag or similar mechanism to demonstrate the coherency so VFIO could advertise that if it has VFIO_DMA_CC_IOMMU, for vhost kernel backend we don't need that since it's a software backend. Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20220214060346.72455-1-jasowang@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/i386')
| -rw-r--r-- | include/hw/i386/intel_iommu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/i386/intel_iommu.h b/include/hw/i386/intel_iommu.h index 41783ee46d..3b5ac869db 100644 --- a/include/hw/i386/intel_iommu.h +++ b/include/hw/i386/intel_iommu.h @@ -228,6 +228,7 @@ struct IntelIOMMUState { bool caching_mode; /* RO - is cap CM enabled? */ bool scalable_mode; /* RO - is Scalable Mode supported? */ + bool snoop_control; /* RO - is SNP filed supported? */ dma_addr_t root; /* Current root table pointer */ bool root_scalable; /* Type of root table (scalable or not) */ |