From patchwork Tue Feb 19 23:04:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Larrew X-Patchwork-Id: 221922 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 E12252C0084 for ; Wed, 20 Feb 2013 10:50:01 +1100 (EST) Received: from localhost ([::1]:49244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7wFy-0007L6-Fs for incoming@patchwork.ozlabs.org; Tue, 19 Feb 2013 18:05:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7wFb-0006fi-En for qemu-devel@nongnu.org; Tue, 19 Feb 2013 18:05:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7wFT-0007AA-92 for qemu-devel@nongnu.org; Tue, 19 Feb 2013 18:05:25 -0500 Received: from [32.97.110.55] (port=39306 helo=jlarrew.austin.ibm.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7wFS-00076H-Uz for qemu-devel@nongnu.org; Tue, 19 Feb 2013 18:05:19 -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 r1JN56fp022019; Tue, 19 Feb 2013 17:05:06 -0600 Received: (from jlarrew@localhost) by jlarrew.austin.ibm.com (8.14.5/8.14.5/Submit) id r1JN550x022005; Tue, 19 Feb 2013 17:05:05 -0600 From: Jesse Larrew To: qemu-devel@nongnu.org Date: Tue, 19 Feb 2013 17:04:50 -0600 Message-Id: <1361315093-19383-6-git-send-email-jlarrew@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1361315093-19383-1-git-send-email-jlarrew@linux.vnet.ibm.com> References: <1361315093-19383-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 5/8] virtio-balloon: fill in the table of feature_sizes 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 There are two feature bits for virtio-balloon: VIRTIO_BALLOON_F_MUST_TELL_HOST, and VIRTIO_BALLOON_F_STATS_VQ. Since these features don't require additional fields in the config struct, set the 'end' field to the end of the last field in the struct. Signed-off-by: Jesse Larrew --- hw/virtio-balloon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 81f27e9..c64e1b7 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -30,8 +30,10 @@ #endif static VirtIOFeature feature_sizes[] = { - {.flags = 0xffffffff, /* dummy table -- all features included. */ - .end = sizeof(struct virtio_balloon_config)}, + {.flags = 1 << VIRTIO_BALLOON_F_MUST_TELL_HOST, + .end = endof(struct virtio_balloon_config, actual)}, + {.flags = 1 << VIRTIO_BALLOON_F_STATS_VQ, + .end = endof(struct virtio_balloon_config, actual)}, {} };