[fedora-virt] [PATCH 2/4] pc: Add backward compatibility options for virtio-serial
Amit Shah
amit.shah at redhat.com
Thu Feb 25 13:11:14 UTC 2010
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 at redhat.com>
---
hw/pc.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index d705dd3..e13b17e 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 = {
@@ -1343,6 +1355,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 = "PCI",
.property = "rombar",
.value = stringify(0),
@@ -1366,6 +1386,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.2.5
More information about the virt
mailing list