2 * QEMU S390x floating interrupt controller (flic)
4 * Copyright 2014 IBM Corp.
5 * Author(s): Jens Freimann <jfrei@linux.vnet.ibm.com>
6 * Cornelia Huck <cornelia.huck@de.ibm.com>
8 * This work is licensed under the terms of the GNU GPL, version 2 or (at
9 * your option) any later version. See the COPYING file in the top-level
13 #include "qemu/error-report.h"
14 #include "hw/sysbus.h"
15 #include "migration/qemu-file.h"
16 #include "hw/s390x/s390_flic.h"
19 S390FLICState
*s390_get_flic(void)
23 fs
= S390_FLIC_COMMON(object_resolve_path(TYPE_KVM_S390_FLIC
, NULL
));
25 fs
= S390_FLIC_COMMON(object_resolve_path(TYPE_QEMU_S390_FLIC
, NULL
));
30 void s390_flic_init(void)
35 dev
= s390_flic_kvm_create();
37 dev
= qdev_create(NULL
, TYPE_QEMU_S390_FLIC
);
38 object_property_add_child(qdev_get_machine(), TYPE_QEMU_S390_FLIC
,
43 error_report("flic: couldn't create qdev");
47 static const TypeInfo qemu_s390_flic_info
= {
48 .name
= TYPE_QEMU_S390_FLIC
,
49 .parent
= TYPE_S390_FLIC_COMMON
,
50 .instance_size
= sizeof(QEMUS390FLICState
),
53 static const TypeInfo s390_flic_common_info
= {
54 .name
= TYPE_S390_FLIC_COMMON
,
55 .parent
= TYPE_SYS_BUS_DEVICE
,
56 .instance_size
= sizeof(S390FLICState
),
57 .class_size
= sizeof(S390FLICStateClass
),
60 static void qemu_s390_flic_register_types(void)
62 type_register_static(&s390_flic_common_info
);
63 type_register_static(&qemu_s390_flic_info
);
66 type_init(qemu_s390_flic_register_types
)