From patchwork Mon Feb 15 15:13:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 45392 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 655C5B7CB6 for ; Tue, 16 Feb 2010 02:55:58 +1100 (EST) Received: from localhost ([127.0.0.1]:57515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nh3Cz-0006k4-7F for incoming@patchwork.ozlabs.org; Mon, 15 Feb 2010 10:50:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nh3As-00060x-E5 for qemu-devel@nongnu.org; Mon, 15 Feb 2010 10:47:50 -0500 Received: from [199.232.76.173] (port=36241 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nh3Ar-00060M-UO for qemu-devel@nongnu.org; Mon, 15 Feb 2010 10:47:50 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nh3Ap-00020y-Qa for qemu-devel@nongnu.org; Mon, 15 Feb 2010 10:47:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55739) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nh2fR-00080j-B0 for qemu-devel@nongnu.org; Mon, 15 Feb 2010 10:15:21 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1FFF9bi019361 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Feb 2010 10:15:09 -0500 Received: from localhost (vpn-234-46.phx2.redhat.com [10.3.234.46]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1FFF7FX013225; Mon, 15 Feb 2010 10:15:08 -0500 From: Amit Shah To: qemu-devel@nongnu.org Date: Mon, 15 Feb 2010 20:43:55 +0530 Message-Id: <1266246836-19932-2-git-send-email-amit.shah@redhat.com> In-Reply-To: <1266246836-19932-1-git-send-email-amit.shah@redhat.com> References: <1266246836-19932-1-git-send-email-amit.shah@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Amit Shah , kraxel@redhat.com Subject: [Qemu-devel] [PATCH v2 2/3] pc: Add backward compatibility options for virtio-serial X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index c27ad0f..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),