summaryrefslogtreecommitdiffstats
path: root/hw/i386/intel_iommu_internal.h
diff options
context:
space:
mode:
authorJason Wang2022-02-14 07:03:46 +0100
committerMichael S. Tsirkin2022-03-06 11:08:23 +0100
commitb8ffd7d6713fb2703f4b09cea3e62d1c61767107 (patch)
treec4d35897c53f09c81366f67f682be60be2b5d13c /hw/i386/intel_iommu_internal.h
parentvhost-vdpa: make notifiers _init()/_uninit() symmetric (diff)
downloadqemu-b8ffd7d6713fb2703f4b09cea3e62d1c61767107.tar.gz
qemu-b8ffd7d6713fb2703f4b09cea3e62d1c61767107.tar.xz
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 'hw/i386/intel_iommu_internal.h')
-rw-r--r--hw/i386/intel_iommu_internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h
index a6c788049b..1ff13b40f9 100644
--- a/hw/i386/intel_iommu_internal.h
+++ b/hw/i386/intel_iommu_internal.h
@@ -188,6 +188,7 @@
#define VTD_ECAP_IR (1ULL << 3)
#define VTD_ECAP_EIM (1ULL << 4)
#define VTD_ECAP_PT (1ULL << 6)
+#define VTD_ECAP_SC (1ULL << 7)
#define VTD_ECAP_MHMV (15ULL << 20)
#define VTD_ECAP_SRS (1ULL << 31)
#define VTD_ECAP_SMTS (1ULL << 43)