diff options
author | Jason Wang | 2022-02-14 07:03:46 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2022-03-06 11:08:23 +0100 |
commit | b8ffd7d6713fb2703f4b09cea3e62d1c61767107 (patch) | |
tree | c4d35897c53f09c81366f67f682be60be2b5d13c /hw/i386/intel_iommu_internal.h | |
parent | vhost-vdpa: make notifiers _init()/_uninit() symmetric (diff) | |
download | qemu-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.h | 1 |
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) |