[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 16/44] vdpa: Skip protected ram IOMMU mappings
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 16/44] vdpa: Skip protected ram IOMMU mappings |
Date: |
Wed, 20 Oct 2021 06:19:56 -0400 |
From: Eugenio Pérez <eperezma@redhat.com>
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>
---
hw/virtio/vhost-vdpa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 47d7a5a23d..ea1aa71ad8 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -28,6 +28,7 @@ static bool
vhost_vdpa_listener_skipped_section(MemoryRegionSection *section)
{
return (!memory_region_is_ram(section->mr) &&
!memory_region_is_iommu(section->mr)) ||
+ memory_region_is_protected(section->mr) ||
/* vhost-vDPA doesn't allow MMIO to be mapped */
memory_region_is_ram_device(section->mr) ||
/*
--
MST
- [PULL v2 04/44] tests: acpi: q35: test for x2APIC entries in SRAT, (continued)
- [PULL v2 04/44] tests: acpi: q35: test for x2APIC entries in SRAT, Michael S. Tsirkin, 2021/10/20
- [PULL v2 05/44] tests: acpi: update expected tables blobs, Michael S. Tsirkin, 2021/10/20
- [PULL v2 06/44] tests: acpi: whitelist new expected table tests/data/acpi/q35/DMAR.dmar, Michael S. Tsirkin, 2021/10/20
- [PULL v2 07/44] tests: acpi: add testcase for intel_iommu (DMAR table), Michael S. Tsirkin, 2021/10/20
- [PULL v2 08/44] tests: acpi: add expected blob for DMAR table, Michael S. Tsirkin, 2021/10/20
- [PULL v2 09/44] tests: acpi: whitelist expected blobs for new acpi/q35/ivrs testcase, Michael S. Tsirkin, 2021/10/20
- [PULL v2 10/44] tests: acpi: add testcase for amd-iommu (IVRS table), Michael S. Tsirkin, 2021/10/20
- [PULL v2 11/44] tests: acpi: update expected blobs, Michael S. Tsirkin, 2021/10/20
- [PULL v2 12/44] tests: acpi: arm/virt: drop redundant test_acpi_one() in test_acpi_virt_tcg(), Michael S. Tsirkin, 2021/10/20
- [PULL v2 15/44] tests: bios-tables-test: use qtest_has_accel() API to register TCG only tests, Michael S. Tsirkin, 2021/10/20
- [PULL v2 16/44] vdpa: Skip protected ram IOMMU mappings,
Michael S. Tsirkin <=
- [PULL v2 14/44] tests: migration-test: use qtest_has_accel() API, Michael S. Tsirkin, 2021/10/20
- [PULL v2 13/44] tests: arm-cpu-features: use qtest_has_kvm() API, Michael S. Tsirkin, 2021/10/20
- [PULL v2 17/44] vdpa: Add vhost_vdpa_section_end, Michael S. Tsirkin, 2021/10/20
- [PULL v2 19/44] virtio-iommu: Remove the non transitional name, Michael S. Tsirkin, 2021/10/20
- [PULL v2 20/44] virtio-iommu: Drop base_name and change generic_name, Michael S. Tsirkin, 2021/10/20
- [PULL v2 23/44] vhost-user-rng-pci: Add vhost-user-rng-pci implementation, Michael S. Tsirkin, 2021/10/20
- [PULL v2 21/44] libvhost-user: fix VHOST_USER_REM_MEM_REG skipping mmap_addr, Michael S. Tsirkin, 2021/10/20
- [PULL v2 18/44] vdpa: Check for iova range at mappings changes, Michael S. Tsirkin, 2021/10/20
- [PULL v2 24/44] docs: Add documentation for vhost based RNG implementation, Michael S. Tsirkin, 2021/10/20
- [PULL v2 26/44] failover: fix a regression introduced by JSON'ification of -device, Michael S. Tsirkin, 2021/10/20