mirror of https://github.com/xemu-project/xemu.git
memory: Rename memory_region_notify_one to memory_region_notify_iommu_one
Previous name didn't reflect the iommu operation. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20201116165506.31315-2-eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
81ee17aa46
commit
3b5ebf8532
|
@ -472,7 +472,7 @@ static void smmu_unmap_notifier_range(IOMMUNotifier *n)
|
||||||
entry.perm = IOMMU_NONE;
|
entry.perm = IOMMU_NONE;
|
||||||
entry.addr_mask = n->end - n->start;
|
entry.addr_mask = n->end - n->start;
|
||||||
|
|
||||||
memory_region_notify_one(n, &entry);
|
memory_region_notify_iommu_one(n, &entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unmap all notifiers attached to @mr */
|
/* Unmap all notifiers attached to @mr */
|
||||||
|
|
|
@ -828,7 +828,7 @@ static void smmuv3_notify_iova(IOMMUMemoryRegion *mr,
|
||||||
entry.addr_mask = num_pages * (1 << granule) - 1;
|
entry.addr_mask = num_pages * (1 << granule) - 1;
|
||||||
entry.perm = IOMMU_NONE;
|
entry.perm = IOMMU_NONE;
|
||||||
|
|
||||||
memory_region_notify_one(n, &entry);
|
memory_region_notify_iommu_one(n, &entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* invalidate an asid/iova range tuple in all mr's */
|
/* invalidate an asid/iova range tuple in all mr's */
|
||||||
|
|
|
@ -3497,7 +3497,7 @@ static void vtd_address_space_unmap(VTDAddressSpace *as, IOMMUNotifier *n)
|
||||||
/* This field is meaningless for unmap */
|
/* This field is meaningless for unmap */
|
||||||
entry.translated_addr = 0;
|
entry.translated_addr = 0;
|
||||||
|
|
||||||
memory_region_notify_one(n, &entry);
|
memory_region_notify_iommu_one(n, &entry);
|
||||||
|
|
||||||
start += mask;
|
start += mask;
|
||||||
remain -= mask;
|
remain -= mask;
|
||||||
|
@ -3535,7 +3535,7 @@ static void vtd_address_space_refresh_all(IntelIOMMUState *s)
|
||||||
|
|
||||||
static int vtd_replay_hook(IOMMUTLBEntry *entry, void *private)
|
static int vtd_replay_hook(IOMMUTLBEntry *entry, void *private)
|
||||||
{
|
{
|
||||||
memory_region_notify_one((IOMMUNotifier *)private, entry);
|
memory_region_notify_iommu_one((IOMMUNotifier *)private, entry);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -236,7 +236,7 @@ enum IOMMUMemoryRegionAttr {
|
||||||
* The IOMMU implementation must use the IOMMU notifier infrastructure
|
* The IOMMU implementation must use the IOMMU notifier infrastructure
|
||||||
* to report whenever mappings are changed, by calling
|
* to report whenever mappings are changed, by calling
|
||||||
* memory_region_notify_iommu() (or, if necessary, by calling
|
* memory_region_notify_iommu() (or, if necessary, by calling
|
||||||
* memory_region_notify_one() for each registered notifier).
|
* memory_region_notify_iommu_one() for each registered notifier).
|
||||||
*
|
*
|
||||||
* Conceptually an IOMMU provides a mapping from input address
|
* Conceptually an IOMMU provides a mapping from input address
|
||||||
* to an output TLB entry. If the IOMMU is aware of memory transaction
|
* to an output TLB entry. If the IOMMU is aware of memory transaction
|
||||||
|
@ -1346,7 +1346,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
|
||||||
IOMMUTLBEntry entry);
|
IOMMUTLBEntry entry);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* memory_region_notify_one: notify a change in an IOMMU translation
|
* memory_region_notify_iommu_one: notify a change in an IOMMU translation
|
||||||
* entry to a single notifier
|
* entry to a single notifier
|
||||||
*
|
*
|
||||||
* This works just like memory_region_notify_iommu(), but it only
|
* This works just like memory_region_notify_iommu(), but it only
|
||||||
|
@ -1357,7 +1357,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
|
||||||
* replaces all old entries for the same virtual I/O address range.
|
* replaces all old entries for the same virtual I/O address range.
|
||||||
* Deleted entries have .@perm == 0.
|
* Deleted entries have .@perm == 0.
|
||||||
*/
|
*/
|
||||||
void memory_region_notify_one(IOMMUNotifier *notifier,
|
void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
|
||||||
IOMMUTLBEntry *entry);
|
IOMMUTLBEntry *entry);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1942,7 +1942,7 @@ void memory_region_unregister_iommu_notifier(MemoryRegion *mr,
|
||||||
memory_region_update_iommu_notify_flags(iommu_mr, NULL);
|
memory_region_update_iommu_notify_flags(iommu_mr, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void memory_region_notify_one(IOMMUNotifier *notifier,
|
void memory_region_notify_iommu_one(IOMMUNotifier *notifier,
|
||||||
IOMMUTLBEntry *entry)
|
IOMMUTLBEntry *entry)
|
||||||
{
|
{
|
||||||
IOMMUNotifierFlag request_flags;
|
IOMMUNotifierFlag request_flags;
|
||||||
|
@ -1979,7 +1979,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,
|
||||||
|
|
||||||
IOMMU_NOTIFIER_FOREACH(iommu_notifier, iommu_mr) {
|
IOMMU_NOTIFIER_FOREACH(iommu_notifier, iommu_mr) {
|
||||||
if (iommu_notifier->iommu_idx == iommu_idx) {
|
if (iommu_notifier->iommu_idx == iommu_idx) {
|
||||||
memory_region_notify_one(iommu_notifier, &entry);
|
memory_region_notify_iommu_one(iommu_notifier, &entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue