From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQCUP-0000cD-8Y for qemu-devel@nongnu.org; Mon, 01 Feb 2016 06:17:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQCUM-0001Dm-2N for qemu-devel@nongnu.org; Mon, 01 Feb 2016 06:17:49 -0500 Received: from e06smtp06.uk.ibm.com ([195.75.94.102]:42870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQCUL-0001D4-OZ for qemu-devel@nongnu.org; Mon, 01 Feb 2016 06:17:46 -0500 Received: from localhost by e06smtp06.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 1 Feb 2016 11:17:42 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 837F91B08061 for ; Mon, 1 Feb 2016 11:17:50 +0000 (GMT) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u11BHeas10682770 for ; Mon, 1 Feb 2016 11:17:40 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u11BHeLC004446 for ; Mon, 1 Feb 2016 04:17:40 -0700 Date: Mon, 1 Feb 2016 12:17:37 +0100 From: Cornelia Huck Message-ID: <20160201121737.6635b837.cornelia.huck@de.ibm.com> In-Reply-To: <1454236146-23293-2-git-send-email-pbonzini@redhat.com> References: <1454236146-23293-1-git-send-email-pbonzini@redhat.com> <1454236146-23293-2-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/10] virtio: move VirtQueueElement at the beginning of the structs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, mst@redhat.com On Sun, 31 Jan 2016 11:28:57 +0100 Paolo Bonzini wrote: > The next patch will make virtqueue_pop/vring_pop allocate memory for > the VirtQueueElement. In some cases (blk, scsi, gpu) the device wants > to extend VirtQueueElement with device-specific fields and, until now, > the place of the VirtQueueElement within the containing struct didn't > matter. When allocating the entire block in virtqueue_pop/vring_pop, > however, the containing struct must basically be a "subclass" of > VirtQueueElement, with the VirtQueueElement as the first field. Make > that the case for blk and scsi; gpu is already doing it. > > Signed-off-by: Paolo Bonzini > --- > hw/scsi/virtio-scsi.c | 3 +-- > include/hw/virtio/virtio-blk.h | 2 +- > include/hw/virtio/virtio-scsi.h | 13 ++++++------- > 3 files changed, 8 insertions(+), 10 deletions(-) Reviewed-by: Cornelia Huck