[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V2 09/11] memory: handle alias for iommu notifier
From: |
Jason Wang |
Subject: |
[Qemu-devel] [PATCH V2 09/11] memory: handle alias for iommu notifier |
Date: |
Thu, 3 Nov 2016 17:27:21 +0800 |
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
memory.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/memory.c b/memory.c
index 33110e9..2bfc37f 100644
--- a/memory.c
+++ b/memory.c
@@ -1603,6 +1603,11 @@ static void
memory_region_update_iommu_notify_flags(MemoryRegion *mr)
void memory_region_register_iommu_notifier(MemoryRegion *mr,
IOMMUNotifier *n)
{
+ if (mr->alias) {
+ memory_region_register_iommu_notifier(mr->alias, n);
+ return;
+ }
+
/* We need to register for at least one bitfield */
assert(n->notifier_flags != IOMMU_NOTIFIER_NONE);
QLIST_INSERT_HEAD(&mr->iommu_notify, n, node);
@@ -1643,6 +1648,10 @@ void memory_region_iommu_replay(MemoryRegion *mr,
IOMMUNotifier *n,
void memory_region_unregister_iommu_notifier(MemoryRegion *mr,
IOMMUNotifier *n)
{
+ if (mr->alias) {
+ memory_region_unregister_iommu_notifier(mr->alias, n);
+ return;
+ }
QLIST_REMOVE(n, node);
memory_region_update_iommu_notify_flags(mr);
}
--
2.7.4
- Re: [Qemu-devel] [PATCH V2 05/11] exec: introduce address_space_get_iotlb_entry(), (continued)
- [Qemu-devel] [PATCH V2 06/11] intel_iommu: support device iotlb descriptor, Jason Wang, 2016/11/03
- [Qemu-devel] [PATCH V2 07/11] virtio-pci: address space translation service (ATS) support, Jason Wang, 2016/11/03
- Re: [Qemu-devel] [PATCH V2 07/11] virtio-pci: address space translation service (ATS) support, Michael S. Tsirkin, 2016/11/03
- Re: [Qemu-devel] [PATCH V2 07/11] virtio-pci: address space translation service (ATS) support, Jason Wang, 2016/11/04
- Re: [Qemu-devel] [PATCH V2 07/11] virtio-pci: address space translation service (ATS) support, Michael S. Tsirkin, 2016/11/10
- Re: [Qemu-devel] [PATCH V2 07/11] virtio-pci: address space translation service (ATS) support, Jason Wang, 2016/11/10
- Re: [Qemu-devel] [PATCH V2 07/11] virtio-pci: address space translation service (ATS) support, Michael S. Tsirkin, 2016/11/10
- Re: [Qemu-devel] [PATCH V2 07/11] virtio-pci: address space translation service (ATS) support, Jason Wang, 2016/11/10
[Qemu-devel] [PATCH V2 08/11] acpi: add ATSR for q35, Jason Wang, 2016/11/03
[Qemu-devel] [PATCH V2 09/11] memory: handle alias for iommu notifier,
Jason Wang <=
[Qemu-devel] [PATCH V2 10/11] memory: handle alias in memory_region_is_iommu(), Jason Wang, 2016/11/03
[Qemu-devel] [PATCH V2 11/11] vhost_net: device IOTLB support, Jason Wang, 2016/11/03
Re: [Qemu-devel] [PATCH V2 00/11] vhost device IOTLB support, no-reply, 2016/11/03