pc: q35: disable CPU hotplug handler on machines less than 2.0
PATCH 1/1 pc: q35: disable CPU hotplug handler on machines less than 2.0
CPU hotplug handling for Q35 machine types was added only since 2.0 but commit wrongly c649983b58 added CPU hotplug handler to Q35 1.5 machine without adding ACPI support for it. As result user can create VCPU but guest couldn't use it since it hasn't any data on it (missing ACPI implementation).
--- hw/i386/pc_q35.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
hw/i386/pc_q35.c +4 -4
@@ -308,7 +308,9 @@ static QEMUMachine pc_q35_machine_v2_0 = { .init = pc_q35_init, }; -#define PC_Q35_1_7_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS +#define PC_Q35_1_7_MACHINE_OPTIONS \ + PC_Q35_MACHINE_OPTIONS, \ + .hot_add_cpu = NULLstatic QEMUMachine pc_q35_machine_v1_7 = {PC_Q35_1_7_MACHINE_OPTIONS ,
@@ -342,9 +344,7 @@ static QEMUMachine pc_q35_machine_v1_5 = { }, }; -#define PC_Q35_1_4_MACHINE_OPTIONS \ - PC_Q35_1_6_MACHINE_OPTIONS, \ - .hot_add_cpu = NULL +#define PC_Q35_1_4_MACHINE_OPTIONS PC_Q35_1_6_MACHINE_OPTIONSstatic QEMUMachine pc_q35_machine_v1_4 = {PC_Q35_1_4_MACHINE_OPTIONS ,
Signature · 1 line
1.7.1
Quoted 28 lines · Igor Mammedov
CPU hotplug handling for Q35 machine types was added only since 2.0 but commit wrongly
c649983b58added CPU hotplug handler to Q35 1.5 machine without adding ACPI support for it. As result user can create VCPU but guest couldn't use it since it hasn't any data on it (missing ACPI implementation).Signed-off-by Igor Mammedov <[email protected]>--- hw/i386/pc_q35.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)hw/i386/pc_q35.c +3
-1@@ -308,7 +308,9 @@ static QEMUMachine pc_q35_machine_v2_0 = { .init = pc_q35_init, }; -#define PC_Q35_1_7_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS +#define PC_Q35_1_7_MACHINE_OPTIONS \ + PC_Q35_MACHINE_OPTIONS, \ + .hot_add_cpu = NULLstatic QEMUMachine pc_q35_machine_v1_7 = {PC_Q35_1_7_MACHINE_OPTIONS ,
hw/i386/pc_q35.c static QEMUMachine pc_q35_machine_v1_5 = { · line 347
Quoted 7 lines
hw/i386/pc_q35.c +1
-3@@ -342,9 +344,7 @@ static QEMUMachine pc_q35_machine_v1_5 = { }, }; -#define PC_Q35_1_4_MACHINE_OPTIONS \ - PC_Q35_1_6_MACHINE_OPTIONS, \ - .hot_add_cpu = NULL +#define PC_Q35_1_4_MACHINE_OPTIONS PC_Q35_1_6_MACHINE_OPTIONS
If I'm looking at the correct code, pc-q35-1.6 still enables cpu hotplug:
#define PC_Q35_1_6_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS
You can remove PC_Q35_1_6_MACHINE_OPTIONS and use PC_Q35_1_7_MACHINE_OPTIONS in all versions less then 1.7.
Quoted 6 lines
hw/i386/pc_q35.c +0
-0static QEMUMachine pc_q35_machine_v1_4 = {PC_Q35_1_4_MACHINE_OPTIONS ,Signature · 1 line
1.7.1