From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ZC1-0005x7-FA for qemu-devel@nongnu.org; Mon, 29 Jun 2015 09:33:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9ZBw-0001tX-DN for qemu-devel@nongnu.org; Mon, 29 Jun 2015 09:33:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ZBw-0001tS-8d for qemu-devel@nongnu.org; Mon, 29 Jun 2015 09:33:44 -0400 Message-ID: <1435584816.30958.13.camel@redhat.com> From: Gerd Hoffmann Date: Mon, 29 Jun 2015 15:33:36 +0200 In-Reply-To: <20150629124823.GA30040@morn.localdomain> References: <1435568020-8669-1-git-send-email-kraxel@redhat.com> <1435568020-8669-4-git-send-email-kraxel@redhat.com> <20150629124823.GA30040@morn.localdomain> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH 03/18] virtio: add struct vp_device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: seabios@seabios.org, qemu-devel@nongnu.org, "Michael S. Tsirkin" On Mo, 2015-06-29 at 08:48 -0400, Kevin O'Connor wrote: > On Mon, Jun 29, 2015 at 10:53:25AM +0200, Gerd Hoffmann wrote: > > For virtio 1.0 support we will need more state than just the (legacy > > mode) ioaddr for each virtio-pci device. Prepare for that by adding > > a new struct for it. For now it carries the ioaddr only. > > > > Signed-off-by: Gerd Hoffmann > > --- > > src/hw/virtio-blk.c | 20 ++++++++++---------- > > src/hw/virtio-pci.c | 15 +++++++++------ > > src/hw/virtio-pci.h | 46 +++++++++++++++++++++++++++------------------- > > src/hw/virtio-ring.c | 4 ++-- > > src/hw/virtio-ring.h | 3 ++- > > src/hw/virtio-scsi.c | 32 +++++++++++++++++--------------- > > 6 files changed, 67 insertions(+), 53 deletions(-) > > > > diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c > > index 15ac171..13cf09a 100644 > > --- a/src/hw/virtio-blk.c > > +++ b/src/hw/virtio-blk.c > > @@ -25,7 +25,7 @@ > > struct virtiodrive_s { > > struct drive_s drive; > > struct vring_virtqueue *vq; > > - u16 ioaddr; > > + struct vp_device *vp; > > }; > > Is there a reason to make this a pointer as opposed to just placing > the vp_device struct directly in struct virtiodrive_s? That'll work too, both blk and scsi have a struct where we can place vp_device inside. I'll change it for v2. cheers, Gerd