mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-25 20:49:49 +00:00
0b8fa32f55
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-4-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for hw/usb/dev-hub.c hw/misc/exynos4210_rng.c hw/misc/bcm2835_rng.c hw/misc/aspeed_scu.c hw/display/virtio-vga.c hw/arm/stm32f205_soc.c; ui/cocoa.m fixed up]
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
/*
|
|
* Virtio input host PCI Bindings
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or
|
|
* (at your option) any later version. See the COPYING file in the
|
|
* top-level directory.
|
|
*/
|
|
|
|
#include "qemu/osdep.h"
|
|
|
|
#include "virtio-pci.h"
|
|
#include "hw/virtio/virtio-input.h"
|
|
#include "qemu/module.h"
|
|
|
|
typedef struct VirtIOInputHostPCI VirtIOInputHostPCI;
|
|
|
|
#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci"
|
|
#define VIRTIO_INPUT_HOST_PCI(obj) \
|
|
OBJECT_CHECK(VirtIOInputHostPCI, (obj), TYPE_VIRTIO_INPUT_HOST_PCI)
|
|
|
|
struct VirtIOInputHostPCI {
|
|
VirtIOPCIProxy parent_obj;
|
|
VirtIOInputHost vdev;
|
|
};
|
|
|
|
static void virtio_host_initfn(Object *obj)
|
|
{
|
|
VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(obj);
|
|
|
|
virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
|
|
TYPE_VIRTIO_INPUT_HOST);
|
|
}
|
|
|
|
static const VirtioPCIDeviceTypeInfo virtio_input_host_pci_info = {
|
|
.generic_name = TYPE_VIRTIO_INPUT_HOST_PCI,
|
|
.parent = TYPE_VIRTIO_INPUT_PCI,
|
|
.instance_size = sizeof(VirtIOInputHostPCI),
|
|
.instance_init = virtio_host_initfn,
|
|
};
|
|
|
|
static void virtio_input_host_pci_register(void)
|
|
{
|
|
virtio_pci_types_register(&virtio_input_host_pci_info);
|
|
}
|
|
|
|
type_init(virtio_input_host_pci_register)
|