vdpa: Skip protected ram IOMMU mappings
Following the logic of commit 56918a126ae ("memory: Add RAM_PROTECTED flag to skip IOMMU mappings") with VFIO, skip memory sections inaccessible via normal mechanisms, including DMA. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20211014141236.923287-2-eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
This commit is contained in:
parent
220ffd949b
commit
c64038c93e
@ -28,6 +28,7 @@ static bool vhost_vdpa_listener_skipped_section(MemoryRegionSection *section)
|
|||||||
{
|
{
|
||||||
return (!memory_region_is_ram(section->mr) &&
|
return (!memory_region_is_ram(section->mr) &&
|
||||||
!memory_region_is_iommu(section->mr)) ||
|
!memory_region_is_iommu(section->mr)) ||
|
||||||
|
memory_region_is_protected(section->mr) ||
|
||||||
/* vhost-vDPA doesn't allow MMIO to be mapped */
|
/* vhost-vDPA doesn't allow MMIO to be mapped */
|
||||||
memory_region_is_ram_device(section->mr) ||
|
memory_region_is_ram_device(section->mr) ||
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user