From patchwork Mon Feb 18 22:22:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Larrew X-Patchwork-Id: 221561 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A70092C0291 for ; Tue, 19 Feb 2013 10:47:03 +1100 (EST) Received: from localhost ([::1]:51708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7aQH-0004rC-Pu for incoming@patchwork.ozlabs.org; Mon, 18 Feb 2013 18:47:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7ZSa-0007zh-32 for qemu-devel@nongnu.org; Mon, 18 Feb 2013 17:45:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7ZSQ-0003pJ-4x for qemu-devel@nongnu.org; Mon, 18 Feb 2013 17:45:16 -0500 Received: from [32.97.110.55] (port=60150 helo=jlarrew.austin.ibm.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7ZSP-0003mY-RD for qemu-devel@nongnu.org; Mon, 18 Feb 2013 17:45:10 -0500 Received: from jlarrew.austin.ibm.com (localhost [127.0.0.1]) by jlarrew.austin.ibm.com (8.14.5/8.14.5) with ESMTP id r1IMMwTZ019145; Mon, 18 Feb 2013 16:22:58 -0600 Received: (from jlarrew@localhost) by jlarrew.austin.ibm.com (8.14.5/8.14.5/Submit) id r1IMMv0i019144; Mon, 18 Feb 2013 16:22:57 -0600 From: Jesse Larrew To: qemu-devel@nongnu.org Date: Mon, 18 Feb 2013 16:22:43 -0600 Message-Id: <1361226165-19030-7-git-send-email-jlarrew@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1361226165-19030-1-git-send-email-jlarrew@linux.vnet.ibm.com> References: <1361226165-19030-1-git-send-email-jlarrew@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 32.97.110.55 Cc: aliguori@us.ibm.com, Jesse Larrew Subject: [Qemu-devel] [PATCH 6/8] virtio-serial: fill in the feature table X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org VIRTIO_CONSOLE_F_MULTIPORT is set when max_nr_ports > 1, so set the config size to include max_nr_ports. Signed-off-by: Jesse Larrew --- hw/virtio-serial-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 9cd9fbd..00d06da 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -26,8 +26,8 @@ #include "virtio-serial.h" static VirtIOFeature feature_sizes[] = { - {.flags = 0xffffffff, /* dummy table -- all features included. */ - .end = sizeof(struct virtio_console_config)}, + {.flags = 1 << VIRTIO_CONSOLE_F_MULTIPORT, + .end = endof(struct virtio_console_config, max_nr_ports)}, {} };