[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [SeaBIOS] [PATCH 03/18] virtio: add struct vp_device
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [SeaBIOS] [PATCH 03/18] virtio: add struct vp_device |
Date: |
Mon, 29 Jun 2015 15:33:36 +0200 |
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 <address@hidden>
> > ---
> > 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
[Qemu-devel] [PATCH 07/18] virtio: add version 1.0 read/write macros, Gerd Hoffmann, 2015/06/29
[Qemu-devel] [PATCH 08/18] virtio: make features 64bit, support version 1.0 features, Gerd Hoffmann, 2015/06/29
[Qemu-devel] [PATCH 09/18] virtio: add version 1.0 support to vp_{get, set}_status, Gerd Hoffmann, 2015/06/29
[Qemu-devel] [PATCH 10/18] virtio: add version 1.0 support to vp_get_isr, Gerd Hoffmann, 2015/06/29