i386: move hyperv_version_id initialization to x86_cpu_realizefn()
[qemu/ar7.git] / hw / virtio / virtio-input-host-pci.c
blob0ac360de4f34b7f5caa5939952fee2c933b1826b
1 /*
2 * Virtio input host PCI Bindings
4 * This work is licensed under the terms of the GNU GPL, version 2 or
5 * (at your option) any later version. See the COPYING file in the
6 * top-level directory.
7 */
9 #include "qemu/osdep.h"
11 #include "virtio-pci.h"
12 #include "hw/virtio/virtio-input.h"
13 #include "qemu/module.h"
14 #include "qom/object.h"
16 typedef struct VirtIOInputHostPCI VirtIOInputHostPCI;
18 #define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci"
19 DECLARE_INSTANCE_CHECKER(VirtIOInputHostPCI, VIRTIO_INPUT_HOST_PCI,
20 TYPE_VIRTIO_INPUT_HOST_PCI)
22 struct VirtIOInputHostPCI {
23 VirtIOPCIProxy parent_obj;
24 VirtIOInputHost vdev;
27 static void virtio_host_initfn(Object *obj)
29 VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(obj);
31 virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
32 TYPE_VIRTIO_INPUT_HOST);
35 static const VirtioPCIDeviceTypeInfo virtio_input_host_pci_info = {
36 .generic_name = TYPE_VIRTIO_INPUT_HOST_PCI,
37 .parent = TYPE_VIRTIO_INPUT_PCI,
38 .instance_size = sizeof(VirtIOInputHostPCI),
39 .instance_init = virtio_host_initfn,
42 static void virtio_input_host_pci_register(void)
44 virtio_pci_types_register(&virtio_input_host_pci_info);
47 type_init(virtio_input_host_pci_register)