From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLV6v-0005kk-Uz for qemu-devel@nongnu.org; Tue, 19 Jan 2016 07:10:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLV6s-0000Ck-2P for qemu-devel@nongnu.org; Tue, 19 Jan 2016 07:10:09 -0500 Received: from e06smtp08.uk.ibm.com ([195.75.94.104]:60507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLV6r-0000Bt-Pk for qemu-devel@nongnu.org; Tue, 19 Jan 2016 07:10:06 -0500 Received: from localhost by e06smtp08.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Jan 2016 12:10:03 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 63E902190023 for ; Tue, 19 Jan 2016 12:09:48 +0000 (GMT) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0JCA0015374312 for ; Tue, 19 Jan 2016 12:10:00 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0JC9xIj018186 for ; Tue, 19 Jan 2016 05:09:59 -0700 Date: Tue, 19 Jan 2016 13:09:57 +0100 From: Cornelia Huck Message-ID: <20160119130957.77634a1d.cornelia.huck@de.ibm.com> In-Reply-To: <1452861718-25806-2-git-send-email-pbonzini@redhat.com> References: <1452861718-25806-1-git-send-email-pbonzini@redhat.com> <1452861718-25806-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 Fri, 15 Jan 2016 13:41:49 +0100 Paolo Bonzini wrote: > The next patch will make virtqueue_pop/vring_pop allocate memory for a s/will make/will make it possible for/ ? I had to spend some time grepping through the code to find that blk and scsi (and gpu, which already had elem at the beginning of its structure) are the only ones that work like this and that other devices do not need any change. > "subclass" of VirtQueueElement. For this to work, VirtQueueElement > must be the first field in the containing struct. > > 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(-) Otherwise, Reviewed-by: Cornelia Huck