From patchwork Fri May 28 09:57:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 53876 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 11439B6F11 for ; Fri, 28 May 2010 20:00:03 +1000 (EST) Received: from localhost ([127.0.0.1]:44678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHwLv-0002wJ-SU for incoming@patchwork.ozlabs.org; Fri, 28 May 2010 05:59:43 -0400 Received: from [140.186.70.92] (port=49155 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHwIn-0001MC-4A for qemu-devel@nongnu.org; Fri, 28 May 2010 05:56:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHwIk-0005R2-NN for qemu-devel@nongnu.org; Fri, 28 May 2010 05:56:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38235) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHwIk-0005Qu-CZ for qemu-devel@nongnu.org; Fri, 28 May 2010 05:56:26 -0400 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 o4S9uPhK001466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 28 May 2010 05:56:25 -0400 Received: from localhost (vpn-226-207.phx2.redhat.com [10.3.226.207]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4S9uO6U001117; Fri, 28 May 2010 05:56:25 -0400 From: Amit Shah To: qemu list Date: Fri, 28 May 2010 15:27:56 +0530 Message-Id: <9015b06db9d4493ede78ed2fc52859e0e4e5728f.1275040675.git.amit.shah@redhat.com> In-Reply-To: <24764499566cd2edeb02b44be2d53150e076d5b5.1275040675.git.amit.shah@redhat.com> References: <24764499566cd2edeb02b44be2d53150e076d5b5.1275040675.git.amit.shah@redhat.com> In-Reply-To: <24764499566cd2edeb02b44be2d53150e076d5b5.1275040675.git.amit.shah@redhat.com> References: <24764499566cd2edeb02b44be2d53150e076d5b5.1275040675.git.amit.shah@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Amit Shah , Juan Quintela , Gerd Hoffmann , Markus Armbruster Subject: [Qemu-devel] [RFC PATCH 2/3] virtio-serial: Add description fields for qdev properties 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 Signed-off-by: Amit Shah --- hw/virtio-console.c | 17 ++++++++++------- hw/virtio-serial.h | 12 ++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index ccd277a..8a99a99 100644 --- a/hw/virtio-console.c +++ b/hw/virtio-console.c @@ -95,11 +95,13 @@ static VirtIOSerialPortInfo virtconsole_info = { .init = virtconsole_initfn, .exit = virtconsole_exitfn, .qdev.props = (Property[]) { - DEFINE_PROP_UINT8("is_console", VirtConsole, port.is_console, 1, ""), + DEFINE_PROP_UINT8("is_console", VirtConsole, port.is_console, 1, + PROP_VIRTSERIAL_IS_CONSOLE_DESC), DEFINE_PROP_UINT32("nr", VirtConsole, port.id, VIRTIO_CONSOLE_BAD_ID, - ""), - DEFINE_PROP_CHR("chardev", VirtConsole, chr, ""), - DEFINE_PROP_STRING("name", VirtConsole, port.name, ""), + PROP_VIRTSERIAL_NR_DESC), + DEFINE_PROP_CHR("chardev", VirtConsole, chr, PROP_VIRTSERIAL_CHR_DESC), + DEFINE_PROP_STRING("name", VirtConsole, port.name, + PROP_VIRTSERIAL_NAME_DESC), DEFINE_PROP_END_OF_LIST(), }, }; @@ -133,9 +135,10 @@ static VirtIOSerialPortInfo virtserialport_info = { .exit = virtconsole_exitfn, .qdev.props = (Property[]) { DEFINE_PROP_UINT32("nr", VirtConsole, port.id, VIRTIO_CONSOLE_BAD_ID, - ""), - DEFINE_PROP_CHR("chardev", VirtConsole, chr, ""), - DEFINE_PROP_STRING("name", VirtConsole, port.name, ""), + PROP_VIRTSERIAL_NR_DESC), + DEFINE_PROP_CHR("chardev", VirtConsole, chr, PROP_VIRTSERIAL_CHR_DESC), + DEFINE_PROP_STRING("name", VirtConsole, port.name, + PROP_VIRTSERIAL_NAME_DESC), DEFINE_PROP_END_OF_LIST(), }, }; diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h index a93b545..2a13432 100644 --- a/hw/virtio-serial.h +++ b/hw/virtio-serial.h @@ -58,6 +58,18 @@ struct virtio_console_control { /* == In-qemu interface == */ +#define PROP_VIRTSERIAL_IS_CONSOLE_DESC \ + "An hvc console will be spawned in the guest since this is a console port" + +#define PROP_VIRTSERIAL_NR_DESC \ + "The 'number' for the port for predictable port numbers for better migration support" + +#define PROP_VIRTSERIAL_CHR_DESC \ + "The chardev to associate this port with" + +#define PROP_VIRTSERIAL_NAME_DESC \ + "Name for the port that's exposed to the guest for port discovery" + typedef struct VirtIOSerial VirtIOSerial; typedef struct VirtIOSerialBus VirtIOSerialBus; typedef struct VirtIOSerialPort VirtIOSerialPort;