pc: Bump up pc version to 0.13 and add a 0.12 compat version
PATCH v2 1/3 pc: Bump up pc version to 0.13 and add a 0.12 compat version
The version 0.13 will be the new default and compatibility options will be added to the 0.12 version.
---
v2: register the 0.12 version in this patch instead of the next one.
hw/pc.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
hw/pc.c +9 -1
@@ -1052,7 +1052,7 @@ void cmos_set_s3_resume(void) }static QEMUMachine pc_machine = { - .name ="pc-0.12" , + .name ="pc-0.13" , .alias ="pc" , .desc ="Standard PC" , .init = pc_init_pci,
@@ -1060,6 +1060,13 @@ static QEMUMachine pc_machine = { .is_default = 1, }; +static QEMUMachine pc_machine_v0_12 = { + .name ="pc-0.12" , + .desc ="Standard PC" , + .init = pc_init_pci, + .max_cpus =255 , +}; +static QEMUMachine pc_machine_v0_11 = { .name ="pc-0.11" , .desc ="Standard PC, qemu 0.11" ,
@@ -1136,6 +1143,7 @@ static QEMUMachine isapc_machine = {static void pc_machine_init (void ) {qemu_register_machine (&pc_machine); +qemu_register_machine (&pc_machine_v0_12);qemu_register_machine (&pc_machine_v0_11);qemu_register_machine (&pc_machine_v0_10);qemu_register_machine (&isapc_machine);
Signature · 1 line
1.6.2.5
Quoted 2 lines · Amit Shah
The version 0.13 will be the new default and compatibility options will be added to the 0.12 version.
Whole series looks good now.
cheers,
Gerd
PATCH v2 2/3 pc: Add backward compatibility options for virtio-serial
In reply to Amit Shahvirtio-serial-pci can support multiple ports in the current development version that will become 0.13. Add compatibility options for the 0.12 and 0.11 pc machine types.
--- hw/pc.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)
hw/pc.c +28 -0
@@ -1065,6 +1065,18 @@ static QEMUMachine pc_machine_v0_12 = { .desc = "Standard PC", .init = pc_init_pci, .max_cpus = 255, + .compat_props = (GlobalProperty []) { + { + .driver ="virtio-serial-pci" , + .property ="max_nr_ports" , + .value =stringify (1 ), + },{ + .driver ="virtio-serial-pci" , + .property ="vectors" , + .value =stringify (0 ), + }, + {/* end of list */ } + } };static QEMUMachine pc_machine_v0_11 = {
@@ -1078,6 +1090,14 @@ static QEMUMachine pc_machine_v0_11 = { .property = "vectors", .value = stringify(0), },{ + .driver = "virtio-serial-pci", + .property = "max_nr_ports", + .value = stringify(1), + },{ + .driver = "virtio-serial-pci", + .property = "vectors", + .value = stringify(0), + },{ .driver = "ide-drive", .property = "ver", .value = "0.11",
@@ -1109,6 +1129,14 @@ static QEMUMachine pc_machine_v0_10 = { .property = "class", .value = stringify(PCI_CLASS_DISPLAY_OTHER), },{ + .driver = "virtio-serial-pci", + .property = "max_nr_ports", + .value = stringify(1), + },{ + .driver = "virtio-serial-pci", + .property = "vectors", + .value = stringify(0), + },{ .driver = "virtio-net-pci", .property = "vectors", .value = stringify(0),
Signature · 1 line
1.6.2.5
PATCH v2 3/3 virtio-serial: don't set MULTIPORT for 1 port dev
From: Michael S. Tsirkin <[email protected]>
Since commit 98b19252cf1bd97c54bc4613f3537c5ec0aae263, all serial devices declare MULTIPORT feature.
To allow 0.12 compatibility, we should clear this when max_nr_ports is 1.
--- hw/virtio-serial-bus.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
hw/virtio-serial-bus.c +4 -2
@@ -335,8 +335,10 @@ static void handle_input(VirtIODevice *vdev, VirtQueue *vq)static uint32_t get_features (VirtIODevice *vdev,uint32_t features) { - features |= (1 <<VIRTIO_CONSOLE_F_MULTIPORT ); - +VirtIOSerial *vser =DO_UPCAST (VirtIOSerial, vdev, vdev); +if (vser->bus->max_nr_ports >1 ) { + features |= (1 <<VIRTIO_CONSOLE_F_MULTIPORT ); + }return features; }
Signature · 1 line
1.6.2.5
Anthony Liguori
AppliedQuoted 5 lines · Amit Shah
The version 0.13 will be the new default and compatibility options will be added to the 0.12 version.
Signed-off-by Amit Shah<[email protected]>
Applied. Thanks.
Regards,
Anthony Liguori
Quoted 42 lines
---
v2: register the 0.12 version in this patch instead of the next one.hw/pc.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)hw/pc.c +9
-1@@ -1052,7 +1052,7 @@ void cmos_set_s3_resume(void) }static QEMUMachine pc_machine = { - .name ="pc-0.12" , + .name ="pc-0.13" , .alias ="pc" , .desc ="Standard PC" , .init = pc_init_pci,@@ -1060,6 +1060,13 @@ static QEMUMachine pc_machine = { .is_default = 1, }; +static QEMUMachine pc_machine_v0_12 = { + .name ="pc-0.12" , + .desc ="Standard PC" , + .init = pc_init_pci, + .max_cpus =255 , +}; +static QEMUMachine pc_machine_v0_11 = { .name ="pc-0.11" , .desc ="Standard PC, qemu 0.11" ,@@ -1136,6 +1143,7 @@ static QEMUMachine isapc_machine = {static void pc_machine_init (void ) {qemu_register_machine (&pc_machine); +qemu_register_machine (&pc_machine_v0_12);qemu_register_machine (&pc_machine_v0_11);qemu_register_machine (&pc_machine_v0_10);qemu_register_machine (&isapc_machine);