memory: Constify IOMMUTLBEvent in memory_region_notify_iommu*()
cover memory: Constify IOMMUTLBEvent in memory_region_notify_iommu*()
Trivial patches using const IOMMUTLBEvent.
Philippe Mathieu-Daudé (3):
memory: Constify IOMMUTLBEvent in memory_region_notify_iommu_one()
memory: Constify IOMMUTLBEvent in memory_region_notify_iommu() hw/i386/iommu: Constify IOMMUTLBEvent in vtd_page_walk_hook prototype
include/exec/memory.h | 4 ++-- hw/i386/intel_iommu.c | 8 ++++---- system/memory.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.41.0
PATCH 1/3 memory: Constify IOMMUTLBEvent in memory_region_notify_iommu_one()
@event access is read-only.
--- include/exec/memory.h | 2 +- system/memory.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
include/exec/memory.h +1 -1
@@ -1852,7 +1852,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr,* range. */ void memory_region_notify_iommu_one (IOMMUNotifier *notifier, -IOMMUTLBEvent *event); +const IOMMUTLBEvent *event);/** * memory_region_unmap_iommu_notifier_range: notify a unmap for an IOMMU
system/memory.c +2 -2
@@ -2006,9 +2006,9 @@ void memory_region_unregister_iommu_notifier(MemoryRegion *mr, }void memory_region_notify_iommu_one (IOMMUNotifier *notifier, -IOMMUTLBEvent *event) +const IOMMUTLBEvent *event) { -IOMMUTLBEntry *entry = &event->entry; +const IOMMUTLBEntry *entry = &event->entry;hwaddr entry_end = entry->iova + entry->addr_mask;IOMMUTLBEntry tmp = *entry;
Signature · 1 line
2.41.0
PATCH 2/3 memory: Constify IOMMUTLBEvent in memory_region_notify_iommu()
In reply to Philippe Mathieu-Daudé@event access is read-only.
--- include/exec/memory.h | 2 +- system/memory.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/exec/memory.h +1 -1
@@ -1837,7 +1837,7 @@ uint64_t memory_region_iommu_get_min_page_size(IOMMUMemoryRegion *iommu_mr);*/ void memory_region_notify_iommu (IOMMUMemoryRegion *iommu_mr,int iommu_idx, -IOMMUTLBEvent event); +const IOMMUTLBEvent event);/** * memory_region_notify_iommu_one: notify a change in an IOMMU translation
system/memory.c +1 -1
@@ -2052,7 +2052,7 @@ void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier)void memory_region_notify_iommu (IOMMUMemoryRegion *iommu_mr,int iommu_idx, -IOMMUTLBEvent event) +const IOMMUTLBEvent event) {IOMMUNotifier *iommu_notifier;
Signature · 1 line
2.41.0
PATCH 3/3 hw/i386/iommu: Constify IOMMUTLBEvent in vtd_page_walk_hook prototype
In reply to Philippe Mathieu-Daudé@event access is read-only.
--- hw/i386/intel_iommu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
hw/i386/intel_iommu.c +4 -4
@@ -1170,7 +1170,7 @@ static int vtd_iova_to_slpte(IntelIOMMUState *s, VTDContextEntry *ce, } } -typedef int (*vtd_page_walk_hook )(IOMMUTLBEvent *event,void *private); +typedef int (*vtd_page_walk_hook )(const IOMMUTLBEvent *event,void *private);/** * Constant information used during page walking
@@ -1533,7 +1533,7 @@ static int vtd_dev_to_context_entry(IntelIOMMUState *s, uint8_t bus_num,return 0 ; } -static int vtd_sync_shadow_page_hook (IOMMUTLBEvent *event, +static int vtd_sync_shadow_page_hook (const IOMMUTLBEvent *event,void *private) {memory_region_notify_iommu (private,0 , *event);
@@ -2219,7 +2219,7 @@ static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s,* page tables. We just deliver the PSI down to * invalidate caches. */ -IOMMUTLBEvent event = { +const IOMMUTLBEvent event = { .type =IOMMU_NOTIFIER_UNMAP , .entry = { .target_as = &address_space_memory,
@@ -3889,7 +3889,7 @@ static void vtd_address_space_refresh_all(IntelIOMMUState *s)vtd_switch_address_space_all (s); } -static int vtd_replay_hook (IOMMUTLBEvent *event,void *private) +static int vtd_replay_hook (const IOMMUTLBEvent *event,void *private) {memory_region_notify_iommu_one (private, event);return 0 ;
Signature · 1 line
2.41.0
Quoted 6 lines · Philippe Mathieu-Daudé
Trivial patches using const IOMMUTLBEvent.
Philippe Mathieu-Daudé (3):
memory: Constify IOMMUTLBEvent inmemory_region_notify_iommu_one()
memory: Constify IOMMUTLBEvent inmemory_region_notify_iommu()hw/i386/iommu: Constify IOMMUTLBEvent invtd_page_walk_hookprototype
Signature · 1 line
Peter Xu
Quoted 6 lines · Philippe Mathieu-Daudé
Trivial patches using const IOMMUTLBEvent.
Philippe Mathieu-Daudé (3):
memory: Constify IOMMUTLBEvent inmemory_region_notify_iommu_one()
memory: Constify IOMMUTLBEvent inmemory_region_notify_iommu()hw/i386/iommu: Constify IOMMUTLBEvent invtd_page_walk_hookprototype
Series queued.