summary refs log tree commit diff stats
path: root/target/loongarch/cpu.h
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2025-03-05 09:27:59 +0800
committerBibo Mao <maobibo@loongson.cn>2025-03-05 09:39:17 +0800
commitd32fde20bd334a9fa4efab95583bc596d01a39ea (patch)
treed48967f2cda025e112d572e2dcf529410a0a0556 /target/loongarch/cpu.h
parent8ccf28c2f6cf54c82485de099b4566b260893445 (diff)
downloadfocaccia-qemu-d32fde20bd334a9fa4efab95583bc596d01a39ea.tar.gz
focaccia-qemu-d32fde20bd334a9fa4efab95583bc596d01a39ea.zip
hw/loongarch/virt: Add topo properties on CPU object
Add some properties such as socket_id, core_id, thread_id and node_id
on LoongArch CPU object.

Co-developed-by: Xianglai Li <lixianglai@loongson.cn>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Diffstat (limited to 'target/loongarch/cpu.h')
-rw-r--r--target/loongarch/cpu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h
index 9dc71fa7f1..677100bd42 100644
--- a/target/loongarch/cpu.h
+++ b/target/loongarch/cpu.h
@@ -417,6 +417,10 @@ struct ArchCPU {
     OnOffAuto lasx;
     OnOffAuto kvm_pv_ipi;
     OnOffAuto kvm_steal_time;
+    int32_t socket_id;  /* socket-id of this CPU */
+    int32_t core_id;    /* core-id of this CPU */
+    int32_t thread_id;  /* thread-id of this CPU */
+    int32_t node_id;    /* NUMA node of this CPU */
 
     /* 'compatible' string for this CPU for Linux device trees */
     const char *dtb_compatible;