From: Markus Armbruster <armbru@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Eduardo Habkost" <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Fabian Deutsch" <fdeutsch@redhat.com>,
qemu-devel@nongnu.org,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Andrea Bolognani" <abologna@redhat.com>,
Gonglei <arei.gonglei@huawei.com>,
"Laine Stump" <laine@redhat.com>,
"Caio Carrara" <ccarrara@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [Qemu-devel] No more chameleon devices
Date: Wed, 17 Oct 2018 13:56:05 +0200 [thread overview]
Message-ID: <878t2wiy7e.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20181017063443.bfjm5yh47cx3vva3@sirius.home.kraxel.org> (Gerd Hoffmann's message of "Wed, 17 Oct 2018 08:34:43 +0200")
Gerd Hoffmann <kraxel@redhat.com> writes:
> On Wed, Oct 17, 2018 at 07:57:39AM +0200, Markus Armbruster wrote:
>> Laine Stump <laine@redhat.com> writes:
>>
>> [...]
>> > In the end, having a device that changed PCI ID depending on what kind
>> > of slot it was plugged into was an idea "too clever for its own good",
>> > should be avoided when new devices are added in the future, and we
>> > should at least provide an alternative that doesn't do that for existing
>> > devices.
>>
>> That means for each chameleon PCI/PCIe device:
>>
>> * create a pair of devices that can only go into one kind of slot
>> * deprecate the chameleon
>
> I think virtio devices are the only ones which actually change the pci
> id and have non-trivial differences.
>
> qemu-xhci can likewise be plugged into both pci and pcie slots. When
> plugged into a pcie slot it'll have pcie endpoint capability. That is
> the only difference though. Do you consider that a chameleon device?
Since the enticing simplicity of letting PCI device models go into PCIe
slots as well is exactly what lured us into this mess, I do.
I believe all we actually saved by creating chameleons was a bunch of
QOM types. New, non-chameleon PCIe devices would have shared the actual
device model code with the existing, non-chameleon PCI devices.
Correcting the design mistake now involves yet another set of QOM types,
for backward compatibility.
A loss of simplicity we failed to consider properly back then was at the
external interface. Traditionally, a qdev has a bus type (printed by
-device help), and it can go into a slot provided by such a bus. But
chameleon PCI qdevs can also go into a slot provided by a PCIe bus. The
interface is now less regular, for no convincing reason.
next prev parent reply other threads:[~2018-10-17 11:56 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 ` Markus Armbruster [this message]
2018-10-17 15:56 ` 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
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=878t2wiy7e.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=abologna@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=ccarrara@redhat.com \
--cc=crosa@redhat.com \
--cc=ehabkost@redhat.com \
--cc=fdeutsch@redhat.com \
--cc=kraxel@redhat.com \
--cc=laine@redhat.com \
--cc=mst@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--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.