diff mbox series

[RFC,v6,07/13] intel_iommu: Mark IOMMUTLBEntry of page notification as IOMMU_IOTLB_UNMAP type

Message ID 20200826143651.7915-8-eperezma@redhat.com (mailing list archive)
State New, archived
Headers show
Series memory: Delete assertion in memory_region_unregister_iommu_notifier | expand

Commit Message

Eugenio Perez Martin Aug. 26, 2020, 2:36 p.m. UTC
Signed-off-by: Eugenio PĂ©rez <eperezma@redhat.com>
---
 hw/i386/intel_iommu.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 2ad6b9d796..ed83e496b8 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -1999,6 +1999,7 @@  static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s,
                     .translated_addr = 0,
                     .addr_mask = size - 1,
                     .perm = IOMMU_NONE,
+                    .type = IOMMU_IOTLB_UNMAP,
                 };
                 memory_region_notify_iommu(&vtd_as->iommu, 0, entry);
             }
@@ -2465,6 +2466,7 @@  static bool vtd_process_device_iotlb_desc(IntelIOMMUState *s,
     entry.iova = addr;
     entry.perm = IOMMU_NONE;
     entry.translated_addr = 0;
+    entry.type = IOMMU_IOTLB_UNMAP;
     memory_region_notify_iommu(&vtd_dev_as->iommu, 0, entry);
 
 done:
@@ -3497,6 +3499,7 @@  static void vtd_address_space_unmap(VTDAddressSpace *as, IOMMUNotifier *n)
         entry.perm = IOMMU_NONE;
         /* This field is meaningless for unmap */
         entry.translated_addr = 0;
+        entry.type = IOMMU_NOTIFIER_UNMAP;
 
         memory_region_notify_iommu_one(n, &entry);