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