summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-03-16 10:38:14 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-03-16 10:38:15 +0000
commitcad0b273e58842fa9d06f5b53d588fbe5e146852 (patch)
treefde7c1eb02a6af6e7da9f2d0258916ad8d88f1cb
parentf235538e38f45f010be9f16834273c2143e0cc77 (diff)
parent588c36cac7a658758b3e0b60bfd62ebc2e4045c6 (diff)
downloadqemu-cad0b273e58842fa9d06f5b53d588fbe5e146852.tar.gz
qemu-cad0b273e58842fa9d06f5b53d588fbe5e146852.tar.bz2
qemu-cad0b273e58842fa9d06f5b53d588fbe5e146852.zip
Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2016-03-16' into staging
Monitor patches for 2016-03-16 # gpg: Signature made Wed 16 Mar 2016 09:47:23 GMT using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-monitor-2016-03-16: qdev-monitor: add missing aliases for virtio device classes qdev-monitor: sort alias table by typename qdev-monitor: improve error message when alias device is unavailable Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--qdev-monitor.c42
1 files changed, 34 insertions, 8 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 81e3ff34a9..be6a07ee49 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -39,19 +39,39 @@ typedef struct QDevAlias
uint32_t arch_mask;
} QDevAlias;
+/* Please keep this table sorted by typename. */
static const QDevAlias qdev_alias_table[] = {
- { "virtio-blk-pci", "virtio-blk", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
- { "virtio-net-pci", "virtio-net", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
- { "virtio-serial-pci", "virtio-serial", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+ { "e1000", "e1000-82540em" },
+ { "ich9-ahci", "ahci" },
+ { "kvm-pci-assign", "pci-assign" },
+ { "lsi53c895a", "lsi" },
+ { "virtio-9p-ccw", "virtio-9p", QEMU_ARCH_S390X },
+ { "virtio-9p-pci", "virtio-9p", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+ { "virtio-balloon-ccw", "virtio-balloon", QEMU_ARCH_S390X },
{ "virtio-balloon-pci", "virtio-balloon",
QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
{ "virtio-blk-ccw", "virtio-blk", QEMU_ARCH_S390X },
+ { "virtio-blk-pci", "virtio-blk", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+ { "virtio-gpu-ccw", "virtio-gpu", QEMU_ARCH_S390X },
+ { "virtio-gpu-pci", "virtio-gpu", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+ { "virtio-input-host-ccw", "virtio-input-host", QEMU_ARCH_S390X },
+ { "virtio-input-host-pci", "virtio-input-host",
+ QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+ { "virtio-keyboard-ccw", "virtio-keyboard", QEMU_ARCH_S390X },
+ { "virtio-keyboard-pci", "virtio-keyboard",
+ QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+ { "virtio-mouse-ccw", "virtio-mouse", QEMU_ARCH_S390X },
+ { "virtio-mouse-pci", "virtio-mouse", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
{ "virtio-net-ccw", "virtio-net", QEMU_ARCH_S390X },
+ { "virtio-net-pci", "virtio-net", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+ { "virtio-rng-ccw", "virtio-rng", QEMU_ARCH_S390X },
+ { "virtio-rng-pci", "virtio-rng", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+ { "virtio-scsi-ccw", "virtio-scsi", QEMU_ARCH_S390X },
+ { "virtio-scsi-pci", "virtio-scsi", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
{ "virtio-serial-ccw", "virtio-serial", QEMU_ARCH_S390X },
- { "lsi53c895a", "lsi" },
- { "ich9-ahci", "ahci" },
- { "kvm-pci-assign", "pci-assign" },
- { "e1000", "e1000-82540em" },
+ { "virtio-serial-pci", "virtio-serial", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+ { "virtio-tablet-ccw", "virtio-tablet", QEMU_ARCH_S390X },
+ { "virtio-tablet-pci", "virtio-tablet", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
{ }
};
@@ -188,6 +208,7 @@ static DeviceClass *qdev_get_device_class(const char **driver, Error **errp)
{
ObjectClass *oc;
DeviceClass *dc;
+ const char *original_name = *driver;
oc = object_class_by_name(*driver);
if (!oc) {
@@ -200,7 +221,12 @@ static DeviceClass *qdev_get_device_class(const char **driver, Error **errp)
}
if (!object_class_dynamic_cast(oc, TYPE_DEVICE)) {
- error_setg(errp, "'%s' is not a valid device model name", *driver);
+ if (*driver != original_name) {
+ error_setg(errp, "'%s' (alias '%s') is not a valid device model"
+ " name", original_name, *driver);
+ } else {
+ error_setg(errp, "'%s' is not a valid device model name", *driver);
+ }
return NULL;
}