[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] PCI: how handle multifunction / compound devices best?
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] PCI: how handle multifunction / compound devices best? |
Date: |
Mon, 04 Jul 2011 17:19:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Anthony Liguori <address@hidden> writes:
> On 07/01/2011 06:27 AM, Gerd Hoffmann wrote:
>> Hi folks,
>>
>> I'm still looking for a sane way to handle multifunction pci devices,
>> specifically a EHCI USB controller with UHCI companion controllers.
>>
>> Here comes a small (incomplete[1]) two patch series to make the issue
>> more clear. The first patch adds a function which creates all devices
>> with the properties set as needed. The second patch adds a '-usb2'
>> switch to windup this in a user-friendly way.
>>
>> Adding a -usb2 switch sucks though. I'd prefer to have some way to
>> create such devices via -device, but without asking the user to create
>> all functions individually on the command line, i.e. have something
>> along the lines of ...
>>
>> qemu -device ich9-usb,slot=08
>
> This is the place where are current infrastructure pretty much stinks.
>
> The first problem is that the device factory interface should be
> involved with device addressing. We really should have:
>
> qemu -device ich9-usb,id=uhci0 -set i440fx.slot[8]=uhci0
>
> The device doesn't care what it's PCI slot address is.
What exactly would such a split buy us?
-device is not a message to the device, it's a message to whatever makes
devices. Therefore, the fact that we specify the device address with
-device doesn't mean we've artificially made the device to care for its
address.
[...]