qemu-cr16/include/system
Peter Xu 041600e23f memory: New AS helper to serialize destroy+free
If an AddressSpace has been created in its own allocated
memory, cleaning it up requires first destroying the AS
and then freeing the memory. Doing this doesn't work:

    address_space_destroy(as);
    g_free_rcu(as, rcu);

because both address_space_destroy() and g_free_rcu()
try to use the same 'rcu' node in the AddressSpace struct
and the address_space_destroy hook gets overwritten.

Provide a new address_space_destroy_free() function which
will destroy the AS and then free the memory it uses, all
in one RCU callback.

(CC to stable because the next commit needs this function.)

Cc: qemu-stable@nongnu.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20250929144228.1994037-3-peter.maydell@linaro.org
Signed-off-by: Peter Xu <peterx@redhat.com>
2025-10-03 09:48:02 -04:00
..
accel-blocker.h
address-spaces.h include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
arch_init.h system: Replace arch_type global by qemu_arch_available() helper 2025-03-11 20:03:26 +01:00
balloon.h
block-backend-common.h
block-backend-global-state.h block-backend: mark blk_io_limits_disable() as GRAPH_UNLOCKED 2025-07-14 15:42:12 +02:00
block-backend-io.h block: Improve blk_get_attached_dev_id() docstring 2025-02-06 13:59:00 +01:00
block-backend.h
block-ram-registrar.h
blockdev.h
confidential-guest-support.h backends/confidential-guest-support: Add set_guest_policy() function 2025-07-12 15:28:21 +02:00
cpu-throttle.h
cpu-timers-internal.h
cpu-timers.h include/exec: Split out icount.h 2025-04-23 14:08:44 -07:00
cpus.h bsd-user, linux-user: introduce qemu_process_cpu_events 2025-09-17 19:00:56 +02:00
cryptodev-vhost-user.h
cryptodev-vhost.h
cryptodev.h
device_tree.h hw: Centralize handling of -machine dumpdtb option 2025-02-24 15:03:42 +00:00
dirtylimit.h
dirtyrate.h
dma.h include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
dump-arch.h
dump.h
event-loop-base.h
host_iommu_device.h vfio/iommufd: Save vendor specific device info 2025-06-05 10:40:38 +02:00
hostmem.h include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
hvf.h accel/hvf: Restrict internal declarations 2025-07-04 14:43:45 +02:00
hvf_int.h accel: Extract AccelClass definition to 'accel/accel-ops.h' 2025-07-15 19:34:33 +02:00
hw_accel.h accel/system: Document cpu_synchronize_state_post_init/reset() 2025-07-04 14:43:46 +02:00
igvm-cfg.h sev: Provide sev_features flags from IGVM VMSA to KVM_SEV_INIT2 2025-07-12 15:28:21 +02:00
iommufd.h vfio/iommufd: register container for cpr 2025-07-03 13:42:28 +02:00
ioport.h include/system: Move exec/ioport.h to system/ioport.h 2025-04-23 14:08:21 -07:00
iothread.h
kvm.h kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c 2025-08-27 10:57:03 +02:00
kvm_int.h accel: Extract AccelClass definition to 'accel/accel-ops.h' 2025-07-15 19:34:33 +02:00
kvm_xen.h
memory.h memory: New AS helper to serialize destroy+free 2025-10-03 09:48:02 -04:00
memory_mapping.h
numa.h
nvmm.h accel/nvmm: Expose nvmm_enabled() to common code 2025-07-04 14:43:46 +02:00
os-posix.h os: add an ability to lock memory on_fault 2025-02-12 11:36:01 -05:00
os-wasm.h include/qemu/osdep.h: Add Emscripten-specific OS dependencies 2025-05-06 16:02:04 +02:00
os-win32.h error: Kill @error_warn 2025-10-01 08:33:24 +02:00
qtest.h include/system: Remove ifndef CONFIG_USER_ONLY in qtest.h 2025-04-23 14:08:44 -07:00
ram_addr.h include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
ramblock.h physmem: Support coordinated discarding of RAM with guest_memfd 2025-06-23 16:03:59 -04:00
replay.h meson: Only allow CONFIG_USER_ONLY from certain source sets 2025-04-23 14:08:44 -07:00
reset.h
rng-random.h
rng.h
rtc.h
runstate-action.h
runstate.h Accelerators patches 2025-07-16 07:13:40 -04:00
seccomp.h
spdm-socket.h
stats.h
system.h system: drop the -old-param option 2025-09-16 17:31:54 +01:00
tcg.h tcg: Move qemu_tcg_mttcg_enabled() to 'system/tcg.h' 2025-04-23 15:07:32 -07:00
tpm.h
tpm_backend.h
tpm_util.h
vhost-user-backend.h vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
watchdog.h
whpx.h accel/whpx: Expose whpx_enabled() to common code 2025-07-04 14:43:46 +02:00
xen-mapcache.h system/xen: remove inline stubs 2025-04-23 13:52:37 -07:00
xen.h meson: Only allow CONFIG_USER_ONLY from certain source sets 2025-04-23 14:08:44 -07:00