]> git.proxmox.com Git - mirror_qemu.git/blobdiff - include/hw/boards.h
hw/boards: Add struct CpuTopology to MachineState
[mirror_qemu.git] / include / hw / boards.h
index c6ad196b14f8c46deba1de36092c13ee1fdd035d..959714093607251a363f5dfea7d5f47213c5d687 100644 (file)
@@ -232,6 +232,20 @@ typedef struct DeviceMemoryState {
     MemoryRegion mr;
 } 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
+ * @max_cpus: the maximum number of logical processors on the machine
+ */
+typedef struct CpuTopology {
+    unsigned int cpus;
+    unsigned int cores;
+    unsigned int threads;
+    unsigned int max_cpus;
+} CpuTopology;
+
 /**
  * MachineState:
  */
@@ -274,6 +288,7 @@ struct MachineState {
     const char *cpu_type;
     AccelState *accelerator;
     CPUArchIdList *possible_cpus;
+    CpuTopology smp;
     struct NVDIMMState *nvdimms_state;
 };