From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nh14G-0005aW-Cy for qemu-devel@nongnu.org; Mon, 15 Feb 2010 08:32:52 -0500 Received: from [199.232.76.173] (port=49473 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nh14F-0005a1-OJ for qemu-devel@nongnu.org; Mon, 15 Feb 2010 08:32:51 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nh14E-0001HT-Ig for qemu-devel@nongnu.org; Mon, 15 Feb 2010 08:32:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14487) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nh14E-0001HN-62 for qemu-devel@nongnu.org; Mon, 15 Feb 2010 08:32:50 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1FDWn8C004932 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Feb 2010 08:32:49 -0500 From: Amit Shah Date: Mon, 15 Feb 2010 19:01:35 +0530 Message-Id: <1266240696-17880-2-git-send-email-amit.shah@redhat.com> In-Reply-To: <1266240696-17880-1-git-send-email-amit.shah@redhat.com> References: <1266240696-17880-1-git-send-email-amit.shah@redhat.com> Subject: [Qemu-devel] [PATCH 2/3] pc: Add backward compatibility options for virtio-serial List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Amit Shah , kraxel@redhat.com virtio-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. Signed-off-by: Amit Shah --- hw/pc.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 7c9a24e..49a95ba 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -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), @@ -1143,6 +1171,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); -- 1.6.2.5