[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 55/57] exec: Remove MemoryRegion::global_locking field
From: |
Paolo Bonzini |
Subject: |
[PULL 55/57] exec: Remove MemoryRegion::global_locking field |
Date: |
Sat, 19 Sep 2020 11:59:14 -0400 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
Last uses of memory_region_clear_global_locking() have been
removed in commit 7070e085d4 ("acpi: mark PMTIMER as unlocked")
and commit 08565552f7 ("cputlb: Move NOTDIRTY handling from I/O
path to TLB path").
Remove memory_region_clear_global_locking() and the now unused
'global_locking' field in MemoryRegion.
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200806150726.962-1-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
accel/tcg/cputlb.c | 4 ++--
exec.c | 2 +-
include/exec/memory.h | 14 --------------
softmmu/memory.c | 6 ------
4 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 6489abbf8c..4657a3b8a6 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -1053,7 +1053,7 @@ static uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry
*iotlbentry,
cpu_io_recompile(cpu, retaddr);
}
- if (mr->global_locking && !qemu_mutex_iothread_locked()) {
+ if (!qemu_mutex_iothread_locked()) {
qemu_mutex_lock_iothread();
locked = true;
}
@@ -1114,7 +1114,7 @@ static void io_writex(CPUArchState *env, CPUIOTLBEntry
*iotlbentry,
*/
save_iotlb_data(cpu, iotlbentry->addr, section, mr_offset);
- if (mr->global_locking && !qemu_mutex_iothread_locked()) {
+ if (!qemu_mutex_iothread_locked()) {
qemu_mutex_lock_iothread();
locked = true;
}
diff --git a/exec.c b/exec.c
index e34b602bdf..bc55a92292 100644
--- a/exec.c
+++ b/exec.c
@@ -3136,7 +3136,7 @@ static bool prepare_mmio_access(MemoryRegion *mr)
bool unlocked = !qemu_mutex_iothread_locked();
bool release_lock = false;
- if (unlocked && mr->global_locking) {
+ if (unlocked) {
qemu_mutex_lock_iothread();
unlocked = false;
release_lock = true;
diff --git a/include/exec/memory.h b/include/exec/memory.h
index ec9edee742..9f6468f346 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -404,7 +404,6 @@ struct MemoryRegion {
bool nonvolatile;
bool rom_device;
bool flush_coalesced_mmio;
- bool global_locking;
uint8_t dirty_log_mask;
bool is_iommu;
RAMBlock *ram_block;
@@ -1738,19 +1737,6 @@ void memory_region_set_flush_coalesced(MemoryRegion *mr);
*/
void memory_region_clear_flush_coalesced(MemoryRegion *mr);
-/**
- * memory_region_clear_global_locking: Declares that access processing does
- * not depend on the QEMU global lock.
- *
- * By clearing this property, accesses to the memory region will be processed
- * outside of QEMU's global lock (unless the lock is held on when issuing the
- * access request). In this case, the device model implementing the access
- * handlers is responsible for synchronization of concurrency.
- *
- * @mr: the memory region to be updated.
- */
-void memory_region_clear_global_locking(MemoryRegion *mr);
-
/**
* memory_region_add_eventfd: Request an eventfd to be triggered when a word
* is written to a location.
diff --git a/softmmu/memory.c b/softmmu/memory.c
index d030eb6f7c..31b0c5250e 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -1221,7 +1221,6 @@ static void memory_region_initfn(Object *obj)
mr->ops = &unassigned_mem_ops;
mr->enabled = true;
mr->romd_mode = true;
- mr->global_locking = true;
mr->destructor = memory_region_destructor_none;
QTAILQ_INIT(&mr->subregions);
QTAILQ_INIT(&mr->coalesced);
@@ -2277,11 +2276,6 @@ void memory_region_clear_flush_coalesced(MemoryRegion
*mr)
}
}
-void memory_region_clear_global_locking(MemoryRegion *mr)
-{
- mr->global_locking = false;
-}
-
static bool userspace_eventfd_warning;
void memory_region_add_eventfd(MemoryRegion *mr,
--
2.26.2
- [PULL 44/57] cutils: introduce get_relocated_path, (continued)
- [PULL 44/57] cutils: introduce get_relocated_path, Paolo Bonzini, 2020/09/19
- [PULL 34/57] configure: move malloc_trim/tcmalloc/jemalloc to meson, Paolo Bonzini, 2020/09/19
- [PULL 33/57] meson: extend libmpathpersist test for static linking, Paolo Bonzini, 2020/09/19
- [PULL 39/57] mtest2make: add support for introspected test dependencies, Paolo Bonzini, 2020/09/19
- [PULL 36/57] configure: move cocoa option to Meson, Paolo Bonzini, 2020/09/19
- [PULL 50/57] qemu-bridge-helper: relocate path to default ACL, Paolo Bonzini, 2020/09/19
- [PULL 54/57] hw/i386/q35: Remove unreachable Xen code on Q35 machine, Paolo Bonzini, 2020/09/19
- [PULL 49/57] vl: relocate path to configuration file, Paolo Bonzini, 2020/09/19
- [PULL 48/57] vl: relocate paths to data directories, Paolo Bonzini, 2020/09/19
- [PULL 57/57] meson: fix installation of keymaps, Paolo Bonzini, 2020/09/19
- [PULL 55/57] exec: Remove MemoryRegion::global_locking field,
Paolo Bonzini <=
- [PULL 27/57] scsi-generic: Fix HM-zoned device scan, Paolo Bonzini, 2020/09/19
- [PULL 30/57] i386/cpu: Clear FEAT_XSAVE_COMP_{LO, HI} when XSAVE is not available, Paolo Bonzini, 2020/09/19
- [PULL 46/57] module: relocate path to modules, Paolo Bonzini, 2020/09/19
- [PULL 37/57] configure: do not limit Hypervisor.framework test to Darwin, Paolo Bonzini, 2020/09/19
- [PULL 43/57] oslib-posix: default exec_dir to bindir, Paolo Bonzini, 2020/09/19
- [PULL 51/57] qga: relocate path to default configuration and hook, Paolo Bonzini, 2020/09/19
- [PULL 42/57] fuzz: use qemu_get_exec_dir, Paolo Bonzini, 2020/09/19