mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
spapr: convert boot CPUs into CPU core devices
Introduce sPAPRMachineClass.dr_cpu_enabled to indicate support for CPU core hotplug. Initialize boot time CPUs as core deivces and prevent topologies that result in partially filled cores. Both of these are done only if CPU core hotplug is supported. Note: An unrelated change in the call to xics_system_init() is done in this patch as it makes sense to use the local variable smt introduced in this patch instead of kvmppc_smt_threads() call here. TODO: We derive sPAPR core type by looking at -cpu <model>. However we don't take care of "compat=" feature yet for boot time as well as hotplug CPUs. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
afd10a0fa6
commit
94a94e4c49
4 changed files with 126 additions and 10 deletions
|
@ -38,6 +38,7 @@ struct sPAPRMachineClass {
|
|||
|
||||
/*< public >*/
|
||||
bool dr_lmb_enabled; /* enable dynamic-reconfig/hotplug of LMBs */
|
||||
bool dr_cpu_enabled; /* enable dynamic-reconfig/hotplug of CPUs */
|
||||
bool use_ohci_by_default; /* use USB-OHCI instead of XHCI */
|
||||
};
|
||||
|
||||
|
@ -81,6 +82,7 @@ struct sPAPRMachineState {
|
|||
/*< public >*/
|
||||
char *kvm_type;
|
||||
MemoryHotplugState hotplug_memory;
|
||||
Object **cores;
|
||||
};
|
||||
|
||||
#define H_SUCCESS 0
|
||||
|
|
|
@ -26,4 +26,7 @@ typedef struct sPAPRCPUCore {
|
|||
ObjectClass *cpu_class;
|
||||
} sPAPRCPUCore;
|
||||
|
||||
void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
|
||||
Error **errp);
|
||||
char *spapr_get_cpu_core_type(const char *model);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue