summary refs log tree commit diff stats
path: root/include/hw/core
diff options
context:
space:
mode:
authorSalil Mehta <salil.mehta@huawei.com>2024-07-16 12:15:01 +0100
committerMichael S. Tsirkin <mst@redhat.com>2024-07-22 20:15:41 -0400
commit24bec42f3d6eae035d5df48c057157f83b260e17 (patch)
treef39ffbd96d7a42750d3de8286e3f5415a961f15a /include/hw/core
parentefdb43b831efa5e0c8da3d062a1a37325b4a7708 (diff)
downloadfocaccia-qemu-24bec42f3d6eae035d5df48c057157f83b260e17.tar.gz
focaccia-qemu-24bec42f3d6eae035d5df48c057157f83b260e17.zip
physmem: Add helper function to destroy CPU AddressSpace
Virtual CPU Hot-unplug leads to unrealization of a CPU object. This also
involves destruction of the CPU AddressSpace. Add common function to help
destroy the CPU AddressSpace.

Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Tested-by: Xianglai Li <lixianglai@loongson.cn>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716111502.202344-7-salil.mehta@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/core')
-rw-r--r--include/hw/core/cpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index d946161717..1c9c775df6 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -496,6 +496,7 @@ struct CPUState {
     QSIMPLEQ_HEAD(, qemu_work_item) work_list;
 
     struct CPUAddressSpace *cpu_ases;
+    int cpu_ases_count;
     int num_ases;
     AddressSpace *as;
     MemoryRegion *memory;