qemu/hw/virtio
Markus Armbruster c6047e9621 virtio-input: Fix device introspection on non-Linux hosts
When CONFIG_LINUX is off, devices "virtio-keyboard-device",
"virtio-mouse-device", "virtio-tablet-device" and
"virtio-input-host-device" aren't compiled in, yet
"virtio-keyboard-pci", "virtio-mouse-pci", "virtio-tablet-pci" and
"virtio-input-host-pci" still are.  Attempts to introspect them crash,
e.g.

    $ qemu-system-x86_64 -device virtio-tablet-pci,help
    **
    ERROR:/work/armbru/qemu/qom/object.c:333:object_initialize_with_type: assertion failed: (type != NULL)

Broken in commit 710e2d9 and commit 006a5ed.

Fix by compiling the "virtio-FOO-pci" exactly when compiling the
"virtio-FOO-device": compile "virtio-keyboard-device",
"virtio-mouse-device", "virtio-tablet-device" regardless of
CONFIG_LINUX, and compile "virtio-input-host-pci" only for
CONFIG_LINUX.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <1444320700-26260-3-git-send-email-armbru@redhat.com>
2015-10-09 15:25:56 +02:00
..
dataplane virtio: avoid leading underscores for helpers 2015-09-10 11:06:05 +03:00
Makefile.objs dataplane: endianness-aware accesses 2015-02-16 15:07:16 +00:00
vhost-backend.c vhost: introduce vhost_backend_get_vq_index method 2015-09-24 16:27:53 +03:00
vhost-user.c vhost-user: add a new message to disable/enable a specific virt queue. 2015-09-24 16:27:53 +03:00
vhost.c vhost-user: add multiple queue support 2015-09-24 16:27:53 +03:00
virtio-balloon.c virtio: avoid leading underscores for helpers 2015-09-10 11:06:05 +03:00
virtio-bus.c virtio: get_features() can fail 2015-07-27 18:11:53 +03:00
virtio-mmio.c virtio: allow virtio-1 queue layout 2015-06-10 18:15:04 +02:00
virtio-pci.c virtio-input: Fix device introspection on non-Linux hosts 2015-10-09 15:25:56 +02:00
virtio-pci.h virtio-input: Fix device introspection on non-Linux hosts 2015-10-09 15:25:56 +02:00
virtio-rng.c virtio: get_features() can fail 2015-07-27 18:11:53 +03:00
virtio.c virtio: introduce virtqueue_discard() 2015-10-01 16:16:52 +03:00