From: "Michael S. Tsirkin" <mst@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
e.voevodin@samsung.com, rusty@rustcorp.com.au,
mark.burton@greensocs.com, qemu-devel@nongnu.org,
"Alexander Graf" <agraf@suse.de>,
stefanha@redhat.com, cornelia.huck@de.ibm.com,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
fred.konrad@greensocs.com
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 [thread overview]
Message-ID: <20121216160155.GB15790@redhat.com> (raw)
In-Reply-To: <87r4muronh.fsf@codemonkey.ws>
On Thu, Dec 13, 2012 at 08:51:30AM -0600, Anthony Liguori wrote:
> Paolo Bonzini <pbonzini@redhat.com> 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
next prev parent reply other threads:[~2012-12-16 15:59 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 16:45 [Qemu-devel] [RFC PATCH v7 0/8] Virtio refactoring fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 1/8] qdev : add a maximum device allowed field for the bus fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 2/8] virtio-bus : Introduce virtio-bus fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 3/8] virtio-pci-bus : Introduce virtio-pci-bus fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 4/8] virtio-pci : Refactor virtio-pci device fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 5/8] virtio-device : Refactor virtio-device fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 6/8] virtio-blk : Add the virtio-blk device fred.konrad
2012-12-11 17:33 ` Peter Maydell
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API fred.konrad
2012-12-11 17:50 ` Peter Maydell
2012-12-13 8:57 ` KONRAD Frédéric
2012-12-12 14:25 ` Peter Maydell
2012-12-12 17:53 ` Andreas Färber
2012-12-12 17:56 ` Paolo Bonzini
2012-12-12 17:58 ` Peter Maydell
2012-12-12 18:03 ` Paolo Bonzini
2012-12-12 21:22 ` Michael S. Tsirkin
2012-12-13 9:37 ` Paolo Bonzini
2012-12-13 14:51 ` Anthony Liguori
2012-12-16 16:01 ` Michael S. Tsirkin [this message]
2012-12-13 9:24 ` KONRAD Frédéric
2012-12-16 16:41 ` Andreas Färber
2012-12-13 8:24 ` KONRAD Frédéric
2012-12-13 10:56 ` KONRAD Frédéric
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 8/8] virtio-blk : QOM modifications fred.konrad
2012-12-11 17:32 ` Peter Maydell
2012-12-11 17:52 ` [Qemu-devel] [RFC PATCH v7 0/8] Virtio refactoring Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121216160155.GB15790@redhat.com \
--to=mst@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=e.voevodin@samsung.com \
--cc=fred.konrad@greensocs.com \
--cc=mark.burton@greensocs.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.