From 328695863c6a7de16529044f85f6821811e0cf33 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Mon, 24 Apr 2017 02:52:50 +0200 Subject: [PATCH 11/23] intel_iommu: use the correct memory region for device IOTLB notification RH-Author: Peter Xu Message-id: <1493002373-13010-7-git-send-email-peterx@redhat.com> Patchwork-id: 74854 O-Subject: [RHEL7.4 qemu-kvm-rhev PATCH v2 6/9] intel_iommu: use the correct memory region for device IOTLB notification Bugzilla: 1335808 RH-Acked-by: Marcel Apfelbaum RH-Acked-by: Michael S. Tsirkin RH-Acked-by: Xiao Wang From: Jason Wang We have a specific memory region for DMAR now, so it's wrong to trigger the notifier with the root region. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Jason Wang Reviewed-by: Peter Xu Reviewed-by: \"Michael S. Tsirkin\" Signed-off-by: Peter Xu Message-Id: <1491562755-23867-7-git-send-email-peterx@redhat.com> Signed-off-by: Eduardo Habkost (cherry picked from commit 10315b9b28c28655ce64500281f4a028d0f8c5ff) Signed-off-by: Peter Xu Signed-off-by: Miroslav Rezanina --- hw/i386/intel_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 22d8226..2412df4 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -1457,7 +1457,7 @@ static bool vtd_process_device_iotlb_desc(IntelIOMMUState *s, entry.iova = addr; entry.perm = IOMMU_NONE; entry.translated_addr = 0; - memory_region_notify_iommu(entry.target_as->root, entry); + memory_region_notify_iommu(&vtd_dev_as->iommu, entry); done: return true; -- 1.8.3.1