[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API.
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API. |
Date: |
Sun, 16 Dec 2012 18:01:55 +0200 |
On Thu, Dec 13, 2012 at 08:51:30AM -0600, Anthony Liguori wrote:
> Paolo Bonzini <address@hidden> writes:
>
> > Il 12/12/2012 18:58, Peter Maydell ha scritto:
> >> It should be equally
> >> valid to just use the PCI transport plugged into a VirtioDevice,
> >> both of which were created by the user with -device [and for
> >> new transports, separate transport and backend should be the
> >> standard]. That means the virtio-bus interface needs a way for
> >> the backend to announce to the transport what it is so that
> >> the PCI transport can set the right PCI IDs.
> >
> > There is such an interface (the device_id, aka VIRTIO_ID_*). Then
> > virtio-pci needs a mapping from the device_id to the (default)
> > vendor_id/device_id/class tuple.
>
> Why?
>
> I think it's perfectly fine to have to specify a device ID for
> virtio-pci.
>
> The way virtio-pci is designed is such that every device that uses
> virtio-pci ends up looking like an independent PCI device.
>
> We should always have virtio-blk-pci, virtio-net-pci, etc. The goal of
> this refactoring should not be to eliminate that.
>
> But these devices should be trivial to implement and modelled in a sane
> way.
>
> I don't think we should be trying to solve the problem of making
> virtio-pci "easy to use". Why would you say:
>
> -device virtio-pci,id=foo -device virtio-blk,bus=foo
>
> When you can just say:
>
> -device virtio-pci-blk
>
> I think we're optimizing for the wrong thing here...
>
> Regards,
>
> Anthony Liguori
>
> >
> > Paolo
I agree. What I mean is this: virtio has device IDs.
These are not pci specific and are defined in linux/virtio_ids.h
Now it looks like pci device IDs of virtio devices are
pci id = 0x1000 + virtio device ID; so let's pull virtio_ids.h
from linux and write a macro that does + 0x1000 instead of hard-coding
values.
Makes sense?
--
MST
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., (continued)
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., Peter Maydell, 2012/12/11
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., Peter Maydell, 2012/12/12
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., Andreas Färber, 2012/12/12
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., Paolo Bonzini, 2012/12/12
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., Peter Maydell, 2012/12/12
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., Paolo Bonzini, 2012/12/12
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., Michael S. Tsirkin, 2012/12/12
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., Paolo Bonzini, 2012/12/13
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., Anthony Liguori, 2012/12/13
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API.,
Michael S. Tsirkin <=
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., KONRAD Frédéric, 2012/12/13
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., Andreas Färber, 2012/12/16
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., KONRAD Frédéric, 2012/12/13
- Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API., KONRAD Frédéric, 2012/12/13
[Qemu-devel] [RFC PATCH v7 5/8] virtio-device : Refactor virtio-device., fred . konrad, 2012/12/10
[Qemu-devel] [RFC PATCH v7 4/8] virtio-pci : Refactor virtio-pci device., fred . konrad, 2012/12/10
[Qemu-devel] [RFC PATCH v7 6/8] virtio-blk : Add the virtio-blk device., fred . konrad, 2012/12/10
[Qemu-devel] [RFC PATCH v7 2/8] virtio-bus : Introduce virtio-bus, fred . konrad, 2012/12/10
[Qemu-devel] [RFC PATCH v7 8/8] virtio-blk : QOM modifications., fred . konrad, 2012/12/10