[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 17/20] Memory: Add func to fire TLB invalidate n
From: |
Liu, Yi L |
Subject: |
[Qemu-devel] [RFC PATCH 17/20] Memory: Add func to fire TLB invalidate notifier |
Date: |
Wed, 26 Apr 2017 18:06:47 +0800 |
This patch adds a separate function to fire IOMMU TLB invalidate notifier.
Signed-off-by: Liu, Yi L <address@hidden>
---
include/exec/memory.h | 9 +++++++++
memory.c | 18 ++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index af15351..0155bad 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -707,6 +707,15 @@ void memory_region_notify_iommu(MemoryRegion *mr,
void memory_region_notify_iommu_svm_bind(MemoryRegion *mr,
void *data);
+/*
+ * memory_region_notify_iommu_invalidate: notify IOMMU
+ * TLB invalidation passdown.
+ *
+ * @mr: the memory region of IOMMU
+ * @data: IOMMU SVM data
+ */
+void memory_region_notify_iommu_invalidate(MemoryRegion *mr,
+ void *data);
/**
* memory_region_notify_one: notify a change in an IOMMU translation
diff --git a/memory.c b/memory.c
index ce0b0ff..8c572d5 100644
--- a/memory.c
+++ b/memory.c
@@ -1750,6 +1750,24 @@ void memory_region_notify_iommu_svm_bind(MemoryRegion
*mr,
}
}
+void memory_region_notify_iommu_invalidate(MemoryRegion *mr,
+ void *data)
+{
+ IOMMUNotifier *iommu_notifier;
+ IOMMUNotifierFlag request_flags;
+
+ assert(memory_region_is_iommu(mr));
+
+ request_flags = IOMMU_NOTIFIER_IOMMU_TLB_INV;
+
+ QLIST_FOREACH(iommu_notifier, &mr->iommu_notify, node) {
+ if (iommu_notifier->notifier_flags & request_flags) {
+ iommu_notifier->notify(iommu_notifier, data);
+ break;
+ }
+ }
+}
+
void memory_region_set_log(MemoryRegion *mr, bool log, unsigned client)
{
uint8_t mask = 1 << client;
--
1.9.1
- Re: [Qemu-devel] [RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier, (continued)
- Re: [Qemu-devel] [RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier, Paolo Bonzini, 2017/04/26
- Re: [Qemu-devel] [RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier, Liu, Yi L, 2017/04/26
- Re: [Qemu-devel] [RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier, Peter Xu, 2017/04/27
- Re: [Qemu-devel] [RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier, Peter Xu, 2017/04/27
- Re: [Qemu-devel] [RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier, Liu, Yi L, 2017/04/27
- Re: [Qemu-devel] [RFC PATCH 12/20] Memory: Add func to fire pasidt_bind notifier, Peter Xu, 2017/04/27
[Qemu-devel] [RFC PATCH 13/20] IOMMU: add pasid_table_info for guest pasid table, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 14/20] intel_iommu: add FOR_EACH_ASSIGN_DEVICE macro, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 15/20] intel_iommu: link whole guest pasid table to host, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 16/20] VFIO: Add notifier for propagating IOMMU TLB invalidate, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 17/20] Memory: Add func to fire TLB invalidate notifier,
Liu, Yi L <=
[Qemu-devel] [RFC PATCH 18/20] intel_iommu: propagate Extended-IOTLB invalidate to host, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 19/20] intel_iommu: propagate PASID-Cache invalidate to host, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 20/20] intel_iommu: propagate Ext-Device-TLB invalidate to host, Liu, Yi L, 2017/04/26