qemu-devel
[Top][All Lists]
Advanced

[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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]