qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v4 12/13] usb: enumerate_slots implementation


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [RFC v4 12/13] usb: enumerate_slots implementation
Date: Wed, 23 Aug 2017 14:17:49 -0300
User-agent: Mutt/1.8.0 (2017-02-23)

On Mon, Aug 21, 2017 at 01:44:19PM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> -ENOCONTEXT
> 
> What is the use case?

I want to let libvirt know what are the available
slots/ports/addresses for devices in a machine, before it uses
device_add or -device.  This is useful when the machine creates
some devices implicitly, when different machine-types provide
different bus topologies, or when a device was created with no
explicit slot/port/address options.

Currently libvirt work around the lack of such interface by
hardcoding information on the implicitly-created devices/buses
and available slots for each machine-type.  See, for example,
src/qemu/qemu_domain_address.c in the libvirt source tree.

> 
> > +    QTAILQ_FOREACH(port, l, next) {
> > +        DeviceSlotInfo *slot = make_slot(BUS(bus));
> > +        /*
> > +         * TODO: should the "bus" option be included, or is
> > +         * "port" enough to identify the USB bus + port?
> > +         */
> 
> Yes, bus must be included, port alone isn't enough in case multiple usb
> host adapters are present.

Thanks!

-- 
Eduardo



reply via email to

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