]> Git Repo - qemu.git/blame - hw/vfio/amd-xgbe.c
vfio/display: add edid support.
[qemu.git] / hw / vfio / amd-xgbe.c
CommitLineData
62d95512
EA
1/*
2 * AMD XGBE VFIO device
3 *
4 * Copyright Linaro Limited, 2015
5 *
6 * Authors:
7 * Eric Auger <[email protected]>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
11 *
12 */
13
974dc73d 14#include "qemu/osdep.h"
62d95512
EA
15#include "hw/vfio/vfio-amd-xgbe.h"
16
17static void amd_xgbe_realize(DeviceState *dev, Error **errp)
18{
19 VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(dev);
20 VFIOAmdXgbeDeviceClass *k = VFIO_AMD_XGBE_DEVICE_GET_CLASS(dev);
21
22 vdev->compat = g_strdup("amd,xgbe-seattle-v1a");
a49531eb 23 vdev->num_compat = 1;
62d95512
EA
24
25 k->parent_realize(dev, errp);
26}
27
28static const VMStateDescription vfio_platform_amd_xgbe_vmstate = {
29 .name = TYPE_VFIO_AMD_XGBE,
30 .unmigratable = 1,
31};
32
33static void vfio_amd_xgbe_class_init(ObjectClass *klass, void *data)
34{
35 DeviceClass *dc = DEVICE_CLASS(klass);
36 VFIOAmdXgbeDeviceClass *vcxc =
37 VFIO_AMD_XGBE_DEVICE_CLASS(klass);
bf853881
PMD
38 device_class_set_parent_realize(dc, amd_xgbe_realize,
39 &vcxc->parent_realize);
62d95512
EA
40 dc->desc = "VFIO AMD XGBE";
41 dc->vmsd = &vfio_platform_amd_xgbe_vmstate;
e4f4fb1e
EH
42 /* Supported by TYPE_VIRT_MACHINE */
43 dc->user_creatable = true;
62d95512
EA
44}
45
46static const TypeInfo vfio_amd_xgbe_dev_info = {
47 .name = TYPE_VFIO_AMD_XGBE,
48 .parent = TYPE_VFIO_PLATFORM,
49 .instance_size = sizeof(VFIOAmdXgbeDevice),
50 .class_init = vfio_amd_xgbe_class_init,
51 .class_size = sizeof(VFIOAmdXgbeDeviceClass),
52};
53
54static void register_amd_xgbe_dev_type(void)
55{
56 type_register_static(&vfio_amd_xgbe_dev_info);
57}
58
59type_init(register_amd_xgbe_dev_type)
This page took 0.166006 seconds and 4 git commands to generate.