[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 0/3] qemu-help: improve -device command line
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v4 0/3] qemu-help: improve -device command line help |
Date: |
Tue, 13 Aug 2013 11:57:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
This isn't patch review, just a couple of observations and questions.
Current use of categories, please correct misunderstandings:
* A device can have multiple categories. Most (all?) devices currently
have exactly one.
* -device help shows categories, like this:
name "NAME", bus "BUS", categories "CAT1" "CAT2"...
* -device help is sorted by category
* -device help shows the device once per category. If the device has no
categories, it's not shown at all.
Should we require devices to have at least one category?
Eric, does libvirt still parse -device help? If yes, can it cope with
the addition of "categories ..."?
A possibly better way to group help by category: instead of adding
categories to each line, add category headlines, like this:
Controller/Bridge/Hub devices:
name "NAME", bus "BUS"...
...
USB devices:
name "NAME", bus "BUS"...
...
Storage devices:
...
This way, showing devices with multiple categories once per category
actually makes sense.
DEVICE_CATEGORY_STORAGE comprises both storage controller devices
(providing storage buses such as IDE, SCSI) and storage devices
(plugging into such buses). Some of our devices (*-fdc, virtio-blk)
integrate both in one device model[*].
DEVICE_CATEGORY_USB comprises *only* host controller devices (providing
USB bus(es)), *not* USB devices (plugging into USB bus). These are
categorized by function instead:
* DEVICE_CATEGORY_BRIDGE: usb-host, usb-hub
* DEVICE_CATEGORY_STORAGE: usb-bot, usb-uas, usb-storage
* DEVICE_CATEGORY_NETWORK: usb-bt-dongle, usb-net
* DEVICE_CATEGORY_INPUT: usb-kbd, usb-ccid, usb-wacom-tablet,
usb-braille, usb-mouse, usb-serial
* DEVICE_CATEGORY_SOUND: usb-audio
* DEVICE_CATEGORY_MISC: usb-tablet, usb-redir
Should they additionally be DEVICE_CATEGORY_USB?
Why do we have DEVICE_CATEGORY_USB, but no categories for other buses,
like PCI or ISA? Devices providing such buses are
DEVICE_CATEGORY_BRIDGE. Why is USB different?
Why is usb-host DEVICE_CATEGORY_BRIDGE?
Why is usb-tablet DEVICE_CATEGORY_MISC, but usb-wacom-tablet
DEVICE_CATEGORY_INPUT?
DEVICE_CATEGORY_INPUT is weird. Some devices in that category are truly
about input (usb-mouse, usb-kbd), others are at least as often used for
output (serial devices, PIOs)...
The difference between DEVICE_CATEGORY_INPUT and DEVICE_CATEGORY_MISC
seems unclear (see usb-tablet vs. usb-wacom-tablet above).
[*] I hate that.
- Re: [Qemu-devel] [PATCH v4 0/3] qemu-help: improve -device command line help,
Markus Armbruster <=