diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-10-01 13:44:36 -0400 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-10-01 13:44:36 -0400 |
commit | 5f992102383ed8ed97076548e1c897c7034ed8a4 (patch) | |
tree | 7b6919d8de677594a81c98d972ea3533d69214f0 /include | |
parent | bb4aa8f59e18412cff0d69f14aee7abba153161a (diff) | |
parent | 16e79e1b01a698908e14eda3078d4a8e7b1b9c2b (diff) | |
download | qemu-5f992102383ed8ed97076548e1c897c7034ed8a4.zip qemu-5f992102383ed8ed97076548e1c897c7034ed8a4.tar.gz qemu-5f992102383ed8ed97076548e1c897c7034ed8a4.tar.bz2 |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* -smp cleanpus
* Hyper-V englightenment functionality
* Documentation cleanups
# gpg: Signature made Fri 01 Oct 2021 01:11:00 PM EDT
# gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg: issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
* remotes/bonzini/tags/for-upstream: (29 commits)
docs: reorganize testing.rst
docs: move gcov section at the end of testing.rst
docs: reorganize tcg-plugins.rst
docs: reorganize qgraph.rst
docs: put "make" information together in build-system.rst
docs: move notes inside the body of the document
docs: name included files ".rst.inc"
i386: Change the default Hyper-V version to match WS2016
i386: Make Hyper-V version id configurable
i386: Implement pseudo 'hv-avic' ('hv-apicv') enlightenment
i386: Move HV_APIC_ACCESS_RECOMMENDED bit setting to hyperv_fill_cpuids()
i386: Support KVM_CAP_HYPERV_ENFORCE_CPUID
i386: Support KVM_CAP_ENFORCE_PV_FEATURE_CPUID
machine: Put all sanity-check in the generic SMP parser
machine: Use g_autoptr in machine_set_smp
machine: Move smp_prefer_sockets to struct SMPCompatProps
machine: Remove smp_parse callback from MachineClass
machine: Make smp_parse generic enough for all arches
machine: Tweak the order of topology members in struct CpuTopology
machine: Use ms instead of global current_machine in sanity-check
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/boards.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index 463a551..5adbcbb 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -109,6 +109,16 @@ typedef struct { } CPUArchIdList; /** + * SMPCompatProps: + * @prefer_sockets - whether sockets are preferred over cores in smp parsing + * @dies_supported - whether dies are supported by the machine + */ +typedef struct { + bool prefer_sockets; + bool dies_supported; +} SMPCompatProps; + +/** * MachineClass: * @deprecation_reason: If set, the machine is marked as deprecated. The * string should provide some clear information about what to use instead. @@ -169,10 +179,6 @@ typedef struct { * kvm-type may be NULL if it is not needed. * @numa_mem_supported: * true if '--numa node.mem' option is supported and false otherwise - * @smp_parse: - * The function pointer to hook different machine specific functions for - * parsing "smp-opts" from QemuOpts to MachineState::CpuTopology and more - * machine specific topology fields, such as smp_dies for PCMachine. * @hotplug_allowed: * If the hook is provided, then it'll be called for each device * hotplug to check whether the device hotplug is allowed. Return @@ -209,7 +215,6 @@ struct MachineClass { void (*reset)(MachineState *state); void (*wakeup)(MachineState *state); int (*kvm_type)(MachineState *machine, const char *arg); - void (*smp_parse)(MachineState *ms, SMPConfiguration *config, Error **errp); BlockInterfaceType block_default_type; int units_per_default_bus; @@ -247,6 +252,7 @@ struct MachineClass { bool nvdimm_supported; bool numa_mem_supported; bool auto_enable_numa; + SMPCompatProps smp_props; const char *default_ram_id; HotplugHandler *(*get_hotplug_handler)(MachineState *machine, @@ -274,17 +280,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; |