qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 00/15] qmp: Report supported device types on 'quer


From: David Hildenbrand
Subject: Re: [Qemu-devel] [RFC 00/15] qmp: Report supported device types on 'query-machines'
Date: Tue, 22 Nov 2016 09:18:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0



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" :) )

If so, the indirect mapping could be of more benefit in the long run.

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



reply via email to

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