qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] No more chameleon devices


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] No more chameleon devices
Date: Thu, 18 Oct 2018 17:11:45 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

Hi Eduardo,

On 10/17/18 6:56 PM, Eduardo Habkost wrote:
(CCing Marcel, in case he has extra details on the complex
Conventional/Express bus/device plugging rules)

On Wed, Oct 17, 2018 at 07:57:39AM +0200, Markus Armbruster wrote:
Laine Stump <address@hidden> 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

Yes, please!  Volunteers?

Do we have similar chameleons outside PCI?
I'm worried that we could be trying to address multiple issues at
the same time, and I'm not sure yet if we should address all of
them in one take.

Right now we need to differentiate non-transitional and
transitional virtio devices, for a few reasons:
* They have different PCI IDs;
* Legacy drivers don't work with non-transitional devices;
* Transitional virtio devices can be plugged to Conventional PCI
   buses; non-transitional ones can't.

This patch addresses that problem.

You seem to be talking about a different issue:
* Some devices (including transitional virtio) can be plugged on
   both Conventional PCI and PCI Express buses (I will call those
   devices "hybrid PCI devices").

The former is a practical problem: management software needs to
be able to ask for a transitional virtio device, depending o the
guest OS being run.

Addressing the latter seems more complex (it would affect other
devices, not just virtio), and I don't see which practical
problems it would solve.

I see some problems it wouldn't solve, though: the system
wouldn't be able to represent the fact that transitional virtio
devices can still work on PCI Express buses, as long as they
support PIO bars; or that Conventional PCI devices can be plugged
to PCI Express root buses.

I don't see problems caused by hybrid conventional/express PCI
devices.  The original problem with virtio devices was just not
being hybrid, it was lying about being hybrid: non-transitional
virtio devices are hybrid, but transitional virtio devices
aren't.

I wouldn't be against abolishing hybrid PCI devices completely if
somebody volunteers to do the work.

+1  -- GSOC Project?

  I just don't see which
problems this would solve.

Maybe would be a step toward a clean "socket-device" modeling (what goes where)
and also QEMU emulation would be cleaner since in bare metal you cannot
plug a PCIe device into a PCI slot and vice-versa or have the same device ID
for both a PCI and a PCIe device.

Thanks,
Marcel








reply via email to

[Prev in Thread] Current Thread [Next in Thread]