[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [PATCH v2 04/12] virtio-pci: remove vdev field
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-stable] [PATCH v2 04/12] virtio-pci: remove vdev field |
Date: |
Tue, 15 Oct 2013 19:06:20 +0300 |
On Tue, Oct 15, 2013 at 05:53:39PM +0200, Paolo Bonzini wrote:
> Il 15/10/2013 17:40, Michael S. Tsirkin ha scritto:
> > On Tue, Oct 15, 2013 at 04:52:45PM +0200, Paolo Bonzini wrote:
> >> > @@ -257,7 +271,7 @@ static void virtio_pci_stop_ioeventfd(VirtIOPCIProxy
> >> > *proxy)
> >> > static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t
> >> > val)
> >> > {
> >> > VirtIOPCIProxy *proxy = opaque;
> >> > - VirtIODevice *vdev = proxy->vdev;
> >> > + VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
> >> > hwaddr pa;
> >> >
> >> > switch (addr) {
> > Hmm this is also datapath.
> > Can this use direct access too, like MSIX?
>
> It's not datapath if you're using ioeventfd, is it?
Well not everyone uses dataplane/vhost.
It's the same for MSIX and eventfd really :)
> Anywya, what I did for MSIX is just noticing that a variable was only
> used in an "else" branch, and sinking the initialization there. You
> cannot do the same here.
>
> Paolo