hw/i386/pc: Defer smbios_set_defaults() to machine_done
[qemu/ar7.git] / hw / virtio / vhost-user-input-pci.c
blob3f4761ce88a1c10dd3b3452a556d7f2d560f8219
1 /*
2 * This work is licensed under the terms of the GNU LGPL, version 2 or
3 * later. See the COPYING.LIB file in the top-level directory.
4 */
6 #include "qemu/osdep.h"
8 #include "hw/virtio/virtio.h"
9 #include "hw/virtio/virtio-input.h"
10 #include "qapi/error.h"
11 #include "qemu/error-report.h"
12 #include "hw/virtio/virtio-pci.h"
13 #include "qom/object.h"
15 typedef struct VHostUserInputPCI VHostUserInputPCI;
17 #define TYPE_VHOST_USER_INPUT_PCI "vhost-user-input-pci"
19 DECLARE_INSTANCE_CHECKER(VHostUserInputPCI, VHOST_USER_INPUT_PCI,
20 TYPE_VHOST_USER_INPUT_PCI)
22 struct VHostUserInputPCI {
23 VirtIOPCIProxy parent_obj;
24 VHostUserInput vhi;
27 static void vhost_user_input_pci_instance_init(Object *obj)
29 VHostUserInputPCI *dev = VHOST_USER_INPUT_PCI(obj);
31 virtio_instance_init_common(obj, &dev->vhi, sizeof(dev->vhi),
32 TYPE_VHOST_USER_INPUT);
35 static const VirtioPCIDeviceTypeInfo vhost_user_input_pci_info = {
36 .generic_name = TYPE_VHOST_USER_INPUT_PCI,
37 .parent = TYPE_VIRTIO_INPUT_PCI,
38 .instance_size = sizeof(VHostUserInputPCI),
39 .instance_init = vhost_user_input_pci_instance_init,
42 static void vhost_user_input_pci_register(void)
44 virtio_pci_types_register(&vhost_user_input_pci_info);
47 type_init(vhost_user_input_pci_register)