From f32e21e2828cf7a8aba2fb27945dc46ca2debe09 Mon Sep 17 00:00:00 2001
From: Amit Shah <amit.shah@redhat.com>
Date: Thu, 25 Feb 2010 18:41:14 +0530
Subject: [PATCH] pc: Add backward compatibility options for virtio-serial
virtio-serial-pci can support multiple ports in the current F-13
version that will become upstream version 0.13. Add compatibility options
for the 0.12, 0.11 and 0.10 pc machine types.
Based on upstream commit 8bfbde6d35c82cc376681289dae2de5e18a087a4
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
hw/pc.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index 26c65c1..90bbfe8 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1330,6 +1330,18 @@ static QEMUMachine pc_machine = {
.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 = {
@@ -1351,6 +1363,14 @@ static QEMUMachine pc_machine_v0_11 = {
.property = "ver",
.value = "0.11",
},{
+ .driver = "virtio-serial-pci",
+ .property = "max_nr_ports",
+ .value = stringify(1),
+ },{
+ .driver = "virtio-serial-pci",
+ .property = "vectors",
+ .value = stringify(0),
+ },{
.driver = "PCI",
.property = "rombar",
.value = stringify(0),
@@ -1374,6 +1394,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),
--
1.6.6.1