From patchwork Mon Feb 18 22:22:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Larrew X-Patchwork-Id: 221562 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 AC3102C0291 for ; Tue, 19 Feb 2013 10:47:18 +1100 (EST) Received: from localhost ([::1]:52530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7aQW-0005IJ-Np for incoming@patchwork.ozlabs.org; Mon, 18 Feb 2013 18:47:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7ZSa-0007zl-3I 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-0003pd-Pb 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 1U7ZSQ-0003mY-Fx 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 r1IMMxTi019149; Mon, 18 Feb 2013 16:22:59 -0600 Received: (from jlarrew@localhost) by jlarrew.austin.ibm.com (8.14.5/8.14.5/Submit) id r1IMMxbq019148; Mon, 18 Feb 2013 16:22:59 -0600 From: Jesse Larrew To: qemu-devel@nongnu.org Date: Mon, 18 Feb 2013 16:22:44 -0600 Message-Id: <1361226165-19030-8-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 7/8] virtio-scsi: fill in 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 Since none of the existing feature bits changed the layout of struct VirtIOSCSIConf, set the minimum struct size to use the full struct (i.e endof(struct VirtIOSCSIConf, cmd_per_lun)). Signed-off-by: Jesse Larrew --- hw/virtio-scsi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index 6c92975..4a0be44 100644 --- a/hw/virtio-scsi.c +++ b/hw/virtio-scsi.c @@ -18,8 +18,12 @@ #include static VirtIOFeature feature_sizes[] = { - {.flags = 0xffffffff, - .end = sizeof(struct VirtIOSCSIConf)}, + {.flags = 1 << VIRTIO_SCSI_F_INOUT, + .end = endof(struct VirtIOSCSIConf, cmd_per_lun)}, + {.flags = 1 << VIRTIO_SCSI_F_HOTPLUG, + .end = endof(struct VirtIOSCSIConf, cmd_per_lun)}, + {.flags = 1 << VIRTIO_SCSI_F_CHANGE, + .end = endof(struct VirtIOSCSIConf, cmd_per_lun)}, {} };