summary refs log tree commit diff stats
path: root/include/hw/boards.h
diff options
context:
space:
mode:
authorYanan Wang <wangyanan55@huawei.com>2021-09-29 10:58:11 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2021-10-01 15:28:19 +0200
commit003f230e37d724ac52004d7f8270159da105780f (patch)
treed7adb2d9209b1c7f05f2e688ef02b45139ae1687 /include/hw/boards.h
parent69fc28a78dbff2d3414bbafce38320b4433ed583 (diff)
downloadfocaccia-qemu-003f230e37d724ac52004d7f8270159da105780f.tar.gz
focaccia-qemu-003f230e37d724ac52004d7f8270159da105780f.zip
machine: Tweak the order of topology members in struct CpuTopology
Now that all the possible topology parameters are integrated in struct
CpuTopology, tweak the order of topology members to be "cpus/sockets/
dies/cores/threads/maxcpus" for readability and consistency. We also
tweak the comment by adding explanation of dies parameter.

Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210929025816.21076-12-wangyanan55@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/boards.h')
-rw-r--r--include/hw/boards.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 2ae039b74f..2a1bba86c0 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -275,17 +275,18 @@ typedef struct DeviceMemoryState {
 /**
  * CpuTopology:
  * @cpus: the number of present logical processors on the machine
- * @cores: the number of cores in one package
- * @threads: the number of threads in one core
  * @sockets: the number of sockets on the machine
+ * @dies: the number of dies in one socket
+ * @cores: the number of cores in one die
+ * @threads: the number of threads in one core
  * @max_cpus: the maximum number of logical processors on the machine
  */
 typedef struct CpuTopology {
     unsigned int cpus;
+    unsigned int sockets;
     unsigned int dies;
     unsigned int cores;
     unsigned int threads;
-    unsigned int sockets;
     unsigned int max_cpus;
 } CpuTopology;