On Tue, Nov 22, 2016 at 09:18:21AM +0100, David Hildenbrand wrote: > > > > > Considered alternatives > > ======================= > > > > Indirect mapping (machine => bus => device) > > ------------------------------------------- > > > > This RFC implements a mechanism to implement ax > > machine-type => supported-device-types > > mapping. An alternative solution I considered was to expose an > > indirect mapping: > > machine-type => default-bus-types > > followed by > > bus-type => supported-device-types. > > > > But exposing only the resulting supported device-types list > > imposes less restrictions on how the device and bus type > > hierarchy is implemented inside QEMU. There's still a > > machine-type => bus-type => device-type > > mapping implemented internally, but it is an implementation > > detail on the current version, and not part of the > > externally-visible interface. > > > > The Implementation > > ================== > > > > This add a new field to MachineClass: default_bus_types, and a > > new field to BusClass: supported_device_type. > > Is it possible to modify a machine (setting some properties e.g. on the > command line), that suddenly more devices are supported? Something like > enabling an additional bus? (I assume so, because it is called "default > bus types" :) ) Yes. See the "Out of scope: Configurable buses" section on the cover letter. > > If so, the indirect mapping could be of more benefit in the long run. Yes, a new mapping may be necessary to find out which options (e.g. "usb=on") or device-types (e.g. "-device isa-fdc", "-device piix3-usb-uhci") will add new buses and make new device-types supported by the machine. But this will probably require new QMP commands, and I still want to keep the default case simple. > > Thinking about my machine at home: > > I just care about the available buses. If my machine doesn't have USB, > but PCI, I can buy a USB PCI card and make it support USB. Then I can > happily plug in USB devices. So the "default" state might at least > no longer be sufficient when wanting to plug in a USB fan on a hot > summer day ;) . > > But, with the indirect mapping, I guess we would need yet another qmp > command ... > > -- > > David -- Eduardo -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list