All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>,
	qemu-devel@nongnu.org, "Caio Carrara" <ccarrara@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	Gonglei <arei.gonglei@huawei.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Laine Stump" <laine@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices
Date: Wed, 17 Oct 2018 11:32:28 -0400	[thread overview]
Message-ID: <20181017112522-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20181017151004.GY31060@habkost.net>

On Wed, Oct 17, 2018 at 12:10:04PM -0300, Eduardo Habkost wrote:
> On Wed, Oct 17, 2018 at 10:22:37AM +0100, Stefan Hajnoczi wrote:
> > On Fri, Oct 12, 2018 at 11:54:35PM -0300, Eduardo Habkost wrote:
> > > This patch adds separate device types for each of those virtio
> > > device flavors:
> > > 
> > > - virtio-*-pci: the existing multi-purpose device types
> > >   - Configurable using `disable-legacy` and `disable-modern`
> > >     properties
> > >   - Legacy driver support is automatically enabled/disabled
> > >     depending on the bus where it is plugged
> > >   - Supports Conventional PCI and PCI Express buses
> > >     (but Conventional PCI is incompatible with
> > >     disable-legacy=off)
> > >   - Changes PCI vendor/device IDs at runtime
> > > - virtio-*-pci-0.9: legacy virtio device
> > >   - Supports Conventional PCI buses only, because
> > >     it has a PIO BAR
> > > - virtio-*-pci-1.0-transitional: virtio-1.0 device supporting legacy drivers
> > >   - Supports Conventional PCI buses only, because
> > >     it has a PIO BAR
> > > - virtio-*-pci-1.0: modern-only
> > >   - Supports both Conventional PCI and PCI Express buses
> > 
> > If new device types are being created, is it time to decouple the VIRTIO
> > PCI transport from the actual VIRTIO device (blk, net, scsi) like we
> > already have with virtio-mmio?
> > 
> >   -device virtio-pci-1.0,id=virtio-pci-0
> >   -device virtio-blk,bus=virtio-pci-0,drive=drive0,serial=mydisk
> > 
> > That way we avoid lots of boilerplate code and an explosion of new
> > device types.
> 
> I don't think that would work.  This would in turn make
> virtio-pci-1.0 a chameleon device that changes PCI ID depending
> on the backend device plugged to it.
> 
> Also, PCI IDs are not the only information contained inside the
> virtio-pci subclasses.  See all the PCI-specific +
> device-type-specific knowledge encoded inside the class_init and
> instance_init functions of each virtio-pci subclass.

I think we need to draw the line somewhere. We can't make new
classes and bother users each time there is a behaviour
change in the device.

But I also think the transport/device split it also an internal virtio
thing, no one who has not read the spec cares about it.

> -- 
> Eduardo

      reply	other threads:[~2018-10-17 15:32 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-13  2:54 [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices Eduardo Habkost
2018-10-14 21:35 ` Michael S. Tsirkin
2018-10-15 18:14   ` Eduardo Habkost
2018-10-16  8:39     ` Cornelia Huck
2018-10-16 13:32       ` Eduardo Habkost
2018-10-16 15:51         ` Cornelia Huck
2018-10-16 17:02     ` Daniel P. Berrangé
2018-10-16 19:12       ` Laine Stump
2018-10-17  5:57         ` [Qemu-devel] No more chameleon devices (was: [PATCH] virtio: Provide version-specific variants of virtio PCI devices) Markus Armbruster
2018-10-17  6:34           ` Gerd Hoffmann
2018-10-17 11:56             ` [Qemu-devel] No more chameleon devices Markus Armbruster
2018-10-17 15:56           ` [Qemu-devel] No more chameleon devices (was: [PATCH] virtio: Provide version-specific variants of virtio PCI devices) Eduardo Habkost
2018-10-17 16:38             ` Michael S. Tsirkin
2018-10-17 19:19               ` Eduardo Habkost
2018-10-18 14:11             ` [Qemu-devel] No more chameleon devices Marcel Apfelbaum
2018-10-18 14:15               ` Peter Maydell
2018-10-18 14:38                 ` Daniel P. Berrangé
2018-10-18 14:41                   ` Peter Maydell
2018-10-18 14:45                     ` Marcel Apfelbaum
2018-10-18 14:48                       ` Peter Maydell
2018-10-18 15:39                         ` Marcel Apfelbaum
2018-10-18 18:07                   ` Eduardo Habkost
2018-10-17 10:43         ` [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices Andrea Bolognani
2018-10-17 15:01           ` Eduardo Habkost
2018-10-17 15:06             ` Michael S. Tsirkin
2018-10-17 15:57               ` Eduardo Habkost
2018-10-18 10:25             ` Andrea Bolognani
2018-10-18 10:27               ` Daniel P. Berrangé
2018-11-14 18:20               ` Eduardo Habkost
2018-10-15  8:16 ` Gerd Hoffmann
2018-10-15 10:27   ` Michael S. Tsirkin
2018-10-15 23:03     ` Eduardo Habkost
2018-10-16  6:48       ` Gerd Hoffmann
2018-10-16 13:39         ` Eduardo Habkost
2018-10-16 18:42           ` Gerd Hoffmann
2018-10-17  5:49             ` [Qemu-devel] "no-user" for properties (was: [PATCH] virtio: Provide version-specific variants of virtio PCI devices) Markus Armbruster
2018-10-15  9:45 ` [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices Cornelia Huck
2018-10-15 23:32   ` Eduardo Habkost
2018-10-17  9:22 ` Stefan Hajnoczi
2018-10-17 15:10   ` Eduardo Habkost
2018-10-17 15:32     ` Michael S. Tsirkin [this message]

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=20181017112522-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=ccarrara@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=laine@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=wainersm@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.