hw/i386: Remove deprecated machines pc-0.10 and pc-0.11
PATCH 1/1 hw/i386: Remove deprecated machines pc-0.10 and pc-0.11
They've been deprecated for two releases and nobody complained that they are still required anymore, so it's time to remove these now. And while we're at it, mark the other remaining old 0.x machine types as deprecated (since they can not properly be used for live-migration anyway).
--- hw/i386/pc_piix.c | 70 ++------------------------------------------------- qemu-deprecated.texi | 2 +- tests/cpu-plug-test.c | 4 +-- 3 files changed, 4 insertions(+), 72 deletions(-)
hw/i386/pc_piix.c +2 -68
@@ -368,7 +368,7 @@ static void pc_compat_1_2(MachineState *machine)x86_cpu_change_kvm_default ("kvm-pv-eoi" ,NULL ); } -/* PC compat function for pc-0.10 to pc-0.13 */ +/* PC compat function for pc-0.12 and pc-0.13 */ static void pc_compat_0_13 (MachineState *machine) {pc_compat_1_2 (machine);
@@ -834,6 +834,7 @@ static void pc_i440fx_0_15_machine_options(MachineClass *m) {pc_i440fx_1_0_machine_options (m); m->hw_version ="0.15" ; + m->deprecation_reason ="use a newer machine type instead" ;SET_MACHINE_COMPAT (m,PC_COMPAT_0_15 ); }
@@ -951,73 +952,6 @@ static void pc_i440fx_0_12_machine_options(MachineClass *m)DEFINE_I440FX_MACHINE (v0_12,"pc-0.12" , pc_compat_0_13, pc_i440fx_0_12_machine_options); - -#define PC_COMPAT_0_11 \ - PC_CPU_MODEL_IDS("0.11") \ - {\ - .driver = "virtio-blk-pci",\ - .property = "vectors",\ - .value = stringify(0),\ - },{\ - .driver = TYPE_PCI_DEVICE,\ - .property = "rombar",\ - .value = stringify(0),\ - },{\ - .driver = "ide-drive",\ - .property = "ver",\ - .value = "0.11",\ - },{\ - .driver = "scsi-disk",\ - .property = "ver",\ - .value = "0.11",\ - }, - -static void pc_i440fx_0_11_machine_options (MachineClass *m) -{ -pc_i440fx_0_12_machine_options (m); - m->hw_version ="0.11" ; - m->deprecation_reason ="use a newer machine type instead" ; -SET_MACHINE_COMPAT (m,PC_COMPAT_0_11 ); -} - -DEFINE_I440FX_MACHINE (v0_11,"pc-0.11" , pc_compat_0_13, - pc_i440fx_0_11_machine_options); - - -#define PC_COMPAT_0_10 \ - PC_CPU_MODEL_IDS("0.10") \ - {\ - .driver = "virtio-blk-pci",\ - .property = "class",\ - .value = stringify(PCI_CLASS_STORAGE_OTHER),\ - },{\ - .driver = "virtio-serial-pci",\ - .property = "class",\ - .value = stringify(PCI_CLASS_DISPLAY_OTHER),\ - },{\ - .driver = "virtio-net-pci",\ - .property = "vectors",\ - .value = stringify(0),\ - },{\ - .driver = "ide-drive",\ - .property = "ver",\ - .value = "0.10",\ - },{\ - .driver = "scsi-disk",\ - .property = "ver",\ - .value = "0.10",\ - }, - -static void pc_i440fx_0_10_machine_options (MachineClass *m) -{ -pc_i440fx_0_11_machine_options (m); - m->hw_version ="0.10" ; -SET_MACHINE_COMPAT (m,PC_COMPAT_0_10 ); -} - -DEFINE_I440FX_MACHINE (v0_10,"pc-0.10" , pc_compat_0_13, - pc_i440fx_0_10_machine_options); - typedef struct { uint16_t gpu_device_id; uint16_t pch_device_id;
qemu-deprecated.texi +1 -1
@@ -124,7 +124,7 @@ their usecases. @section System emulator machines -@subsection pc-0.10 and pc-0.11 (since 3.0) +@subsection pc-0.12, pc-0.13, pc-0.14 and pc-0.15 (since 4.0) These machine types are very old and likely can not be used for live migration from old QEMU versions anymore. A newer machine type should be used instead.
tests/cpu-plug-test.c +1 -3
@@ -157,9 +157,7 @@ static void add_pc_test_case(const char *mname) (strcmp(mname, "pc-0.15") == 0) || (strcmp(mname, "pc-0.14") == 0) || (strcmp(mname, "pc-0.13") == 0) || - (strcmp(mname, "pc-0.12") == 0) || - (strcmp(mname, "pc-0.11") == 0) || - (strcmp(mname, "pc-0.10") == 0)) { + (strcmp(mname, "pc-0.12") == 0)) { path =g_strdup_printf ("cpu-plug/%s/init/%ux%ux%u&maxcpus=%u" , mname, data->sockets, data->cores, data->threads, data->maxcpus);
Signature · 1 line
1.8.3.1
Quoted 5 lines · Thomas Huth
They've been deprecated for two releases and nobody complained that they are still required anymore, so it's time to remove these now. And while we're at it, mark the other remaining old 0.x machine types as deprecated (since they can not properly be used for live-migration anyway).
Do you know why exactly they can't be used for live-migration?
Maybe we should split the removal of pc <= 0.10 and deprecation of pc <= 0.15 into separate patches?
In either case:
Michael, should I queue this, or should it go through your tree?
Quoted 134 lines
Signed-off-by Thomas Huth <[email protected]>--- hw/i386/pc_piix.c | 70 ++------------------------------------------------- qemu-deprecated.texi | 2 +- tests/cpu-plug-test.c | 4 +-- 3 files changed, 4 insertions(+), 72 deletions(-)hw/i386/pc_piix.c +2
-68@@ -368,7 +368,7 @@ static void pc_compat_1_2(MachineState *machine)x86_cpu_change_kvm_default ("kvm-pv-eoi" ,NULL ); } -/* PC compat function for pc-0.10 to pc-0.13 */ +/* PC compat function for pc-0.12 and pc-0.13 */ static void pc_compat_0_13 (MachineState *machine) {pc_compat_1_2 (machine);@@ -834,6 +834,7 @@ static void pc_i440fx_0_15_machine_options(MachineClass *m) {pc_i440fx_1_0_machine_options (m); m->hw_version ="0.15" ; + m->deprecation_reason ="use a newer machine type instead" ;SET_MACHINE_COMPAT (m,PC_COMPAT_0_15 ); }@@ -951,73 +952,6 @@ static void pc_i440fx_0_12_machine_options(MachineClass *m)DEFINE_I440FX_MACHINE (v0_12,"pc-0.12" , pc_compat_0_13, pc_i440fx_0_12_machine_options); - -#define PC_COMPAT_0_11 \ - PC_CPU_MODEL_IDS("0.11") \ - {\ - .driver = "virtio-blk-pci",\ - .property = "vectors",\ - .value = stringify(0),\ - },{\ - .driver = TYPE_PCI_DEVICE,\ - .property = "rombar",\ - .value = stringify(0),\ - },{\ - .driver = "ide-drive",\ - .property = "ver",\ - .value = "0.11",\ - },{\ - .driver = "scsi-disk",\ - .property = "ver",\ - .value = "0.11",\ - }, - -static void pc_i440fx_0_11_machine_options (MachineClass *m) -{ -pc_i440fx_0_12_machine_options (m); - m->hw_version ="0.11" ; - m->deprecation_reason ="use a newer machine type instead" ; -SET_MACHINE_COMPAT (m,PC_COMPAT_0_11 ); -} - -DEFINE_I440FX_MACHINE (v0_11,"pc-0.11" , pc_compat_0_13, - pc_i440fx_0_11_machine_options); - - -#define PC_COMPAT_0_10 \ - PC_CPU_MODEL_IDS("0.10") \ - {\ - .driver = "virtio-blk-pci",\ - .property = "class",\ - .value = stringify(PCI_CLASS_STORAGE_OTHER),\ - },{\ - .driver = "virtio-serial-pci",\ - .property = "class",\ - .value = stringify(PCI_CLASS_DISPLAY_OTHER),\ - },{\ - .driver = "virtio-net-pci",\ - .property = "vectors",\ - .value = stringify(0),\ - },{\ - .driver = "ide-drive",\ - .property = "ver",\ - .value = "0.10",\ - },{\ - .driver = "scsi-disk",\ - .property = "ver",\ - .value = "0.10",\ - }, - -static void pc_i440fx_0_10_machine_options (MachineClass *m) -{ -pc_i440fx_0_11_machine_options (m); - m->hw_version ="0.10" ; -SET_MACHINE_COMPAT (m,PC_COMPAT_0_10 ); -} - -DEFINE_I440FX_MACHINE (v0_10,"pc-0.10" , pc_compat_0_13, - pc_i440fx_0_10_machine_options); - typedef struct { uint16_t gpu_device_id; uint16_t pch_device_id;qemu-deprecated.texi +1
-1@@ -124,7 +124,7 @@ their usecases. @section System emulator machines -@subsection pc-0.10 and pc-0.11 (since 3.0) +@subsection pc-0.12, pc-0.13, pc-0.14 and pc-0.15 (since 4.0) These machine types are very old and likely can not be used for live migration from old QEMU versions anymore. A newer machine type should be used instead.tests/cpu-plug-test.c +1
-3@@ -157,9 +157,7 @@ static void add_pc_test_case(const char *mname) (strcmp(mname, "pc-0.15") == 0) || (strcmp(mname, "pc-0.14") == 0) || (strcmp(mname, "pc-0.13") == 0) || - (strcmp(mname, "pc-0.12") == 0) || - (strcmp(mname, "pc-0.11") == 0) || - (strcmp(mname, "pc-0.10") == 0)) { + (strcmp(mname, "pc-0.12") == 0)) { path =g_strdup_printf ("cpu-plug/%s/init/%ux%ux%u&maxcpus=%u" , mname, data->sockets, data->cores, data->threads, data->maxcpus);Signature · 1 line
1.8.3.1
Signature · 1 line
Eduardo
Quoted 9 lines · Eduardo Habkost
Quoted 5 lines · Thomas Huth
They've been deprecated for two releases and nobody complained that they are still required anymore, so it's time to remove these now. And while we're at it, mark the other remaining old 0.x machine types as deprecated (since they can not properly be used for live-migration anyway).
Do you know why exactly they can't be used for live-migration?
Quoted 8 lines
Maybe we should split the removal of pc <= 0.10 and deprecation of pc <= 0.15 into separate patches?
In either case:
Reviewed-by Eduardo Habkost <[email protected]>Michael, should I queue this, or should it go through your tree?
I'll queue it.
Quoted 138 lines
Quoted 135 lines
Signed-off-by Thomas Huth <[email protected]>--- hw/i386/pc_piix.c | 70 ++------------------------------------------------- qemu-deprecated.texi | 2 +- tests/cpu-plug-test.c | 4 +-- 3 files changed, 4 insertions(+), 72 deletions(-)hw/i386/pc_piix.c +2
-68@@ -368,7 +368,7 @@ static void pc_compat_1_2(MachineState *machine)x86_cpu_change_kvm_default ("kvm-pv-eoi" ,NULL ); } -/* PC compat function for pc-0.10 to pc-0.13 */ +/* PC compat function for pc-0.12 and pc-0.13 */ static void pc_compat_0_13 (MachineState *machine) {pc_compat_1_2 (machine);@@ -834,6 +834,7 @@ static void pc_i440fx_0_15_machine_options(MachineClass *m) {pc_i440fx_1_0_machine_options (m); m->hw_version ="0.15" ; + m->deprecation_reason ="use a newer machine type instead" ;SET_MACHINE_COMPAT (m,PC_COMPAT_0_15 ); }@@ -951,73 +952,6 @@ static void pc_i440fx_0_12_machine_options(MachineClass *m)DEFINE_I440FX_MACHINE (v0_12,"pc-0.12" , pc_compat_0_13, pc_i440fx_0_12_machine_options); - -#define PC_COMPAT_0_11 \ - PC_CPU_MODEL_IDS("0.11") \ - {\ - .driver = "virtio-blk-pci",\ - .property = "vectors",\ - .value = stringify(0),\ - },{\ - .driver = TYPE_PCI_DEVICE,\ - .property = "rombar",\ - .value = stringify(0),\ - },{\ - .driver = "ide-drive",\ - .property = "ver",\ - .value = "0.11",\ - },{\ - .driver = "scsi-disk",\ - .property = "ver",\ - .value = "0.11",\ - }, - -static void pc_i440fx_0_11_machine_options (MachineClass *m) -{ -pc_i440fx_0_12_machine_options (m); - m->hw_version ="0.11" ; - m->deprecation_reason ="use a newer machine type instead" ; -SET_MACHINE_COMPAT (m,PC_COMPAT_0_11 ); -} - -DEFINE_I440FX_MACHINE (v0_11,"pc-0.11" , pc_compat_0_13, - pc_i440fx_0_11_machine_options); - - -#define PC_COMPAT_0_10 \ - PC_CPU_MODEL_IDS("0.10") \ - {\ - .driver = "virtio-blk-pci",\ - .property = "class",\ - .value = stringify(PCI_CLASS_STORAGE_OTHER),\ - },{\ - .driver = "virtio-serial-pci",\ - .property = "class",\ - .value = stringify(PCI_CLASS_DISPLAY_OTHER),\ - },{\ - .driver = "virtio-net-pci",\ - .property = "vectors",\ - .value = stringify(0),\ - },{\ - .driver = "ide-drive",\ - .property = "ver",\ - .value = "0.10",\ - },{\ - .driver = "scsi-disk",\ - .property = "ver",\ - .value = "0.10",\ - }, - -static void pc_i440fx_0_10_machine_options (MachineClass *m) -{ -pc_i440fx_0_11_machine_options (m); - m->hw_version ="0.10" ; -SET_MACHINE_COMPAT (m,PC_COMPAT_0_10 ); -} - -DEFINE_I440FX_MACHINE (v0_10,"pc-0.10" , pc_compat_0_13, - pc_i440fx_0_10_machine_options); - typedef struct { uint16_t gpu_device_id; uint16_t pch_device_id;qemu-deprecated.texi +1
-1@@ -124,7 +124,7 @@ their usecases. @section System emulator machines -@subsection pc-0.10 and pc-0.11 (since 3.0) +@subsection pc-0.12, pc-0.13, pc-0.14 and pc-0.15 (since 4.0) These machine types are very old and likely can not be used for live migration from old QEMU versions anymore. A newer machine type should be used instead.tests/cpu-plug-test.c +1
-3@@ -157,9 +157,7 @@ static void add_pc_test_case(const char *mname) (strcmp(mname, "pc-0.15") == 0) || (strcmp(mname, "pc-0.14") == 0) || (strcmp(mname, "pc-0.13") == 0) || - (strcmp(mname, "pc-0.12") == 0) || - (strcmp(mname, "pc-0.11") == 0) || - (strcmp(mname, "pc-0.10") == 0)) { + (strcmp(mname, "pc-0.12") == 0)) { path =g_strdup_printf ("cpu-plug/%s/init/%ux%ux%u&maxcpus=%u" , mname, data->sockets, data->cores, data->threads, data->maxcpus);Signature · 1 line
1.8.3.1Signature · 1 line
Eduardo
Quoted 9 lines · Michael S. Tsirkin
Quoted 8 lines · Eduardo Habkost
Quoted 5 lines · Thomas Huth
They've been deprecated for two releases and nobody complained that they are still required anymore, so it's time to remove these now. And while we're at it, mark the other remaining old 0.x machine types as deprecated (since they can not properly be used for live-migration anyway).
Do you know why exactly they can't be used for live-migration?
I don't remember the gory details, but IIRC Paolo once said that when you live-migrate from a QEMU version < 1.3 and then reboot the guest, it crashes, ... or something similar. Maybe Paolo can give some details again?
Quoted 2 lines
Quoted 2 lines
Maybe we should split the removal of pc <= 0.10 and deprecation of pc <= 0.15 into separate patches?
In that case I'd need to remove the text from qemu-deprecated.texi first, just to immediately add it afterwards again ... so I'd prefer to keep this in one patch.
Quoted 5 lines
Quoted 3 lines
Reviewed-by Eduardo Habkost <[email protected]>Michael, should I queue this, or should it go through your tree?
I'll queue it.
Thanks to both of you!
Thomas
Quoted 9 lines · Thomas Huth
Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Eduardo Habkost
Quoted 5 lines · Thomas Huth
They've been deprecated for two releases and nobody complained that they are still required anymore, so it's time to remove these now. And while we're at it, mark the other remaining old 0.x machine types as deprecated (since they can not properly be used for live-migration anyway).
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Do you know why exactly they can't be used for live-migration?
I don't remember the gory details, but IIRC Paolo once said that when you live-migrate from a QEMU version < 1.3 and then reboot the guest, it crashes, ... or something similar. Maybe Paolo can give some details again?
Yes---due to the introduction of the memory API, the firmware is not migrated correctly from source to destination. On QEMU <1.3 the 0xf0000-0xfffff area is basically a copy of the higher 0xffff0000-0xffffffff area, while on more recent versions it is initialized with zeroes and the firmware copies from 0xffff0000 to 0xf0000. When you migrate from old to new QEMU, after reboot there's nothing at 0xf0000 and bugs ensue.
Paolo