diff options
author | Tony Krowiak <akrowiak@linux.ibm.com> | 2018-10-10 13:03:06 -0400 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2018-10-12 11:32:18 +0200 |
commit | a51b31535a8ec13997de29b357f7cc1dcd8a7f9c (patch) | |
tree | ee6613e6110172a3f41c92bcefa5ce7b15932031 /hw/s390x/ap-device.c | |
parent | 1d7db85b61cb9888b8ed8c8923343b468405b7a0 (diff) |
s390x/ap: base Adjunct Processor (AP) object model
Introduces the base object model for virtualizing AP devices.
Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
Tested-by: Pierre Morel <pmorel@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <20181010170309.12045-5-akrowiak@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x/ap-device.c')
-rw-r--r-- | hw/s390x/ap-device.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/hw/s390x/ap-device.c b/hw/s390x/ap-device.c new file mode 100644 index 0000000000..f5ac8db968 --- /dev/null +++ b/hw/s390x/ap-device.c @@ -0,0 +1,38 @@ +/* + * Adjunct Processor (AP) matrix device + * + * Copyright 2018 IBM Corp. + * + * 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 "qemu/module.h" +#include "qapi/error.h" +#include "hw/qdev.h" +#include "hw/s390x/ap-device.h" + +static void ap_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + + dc->desc = "AP device class"; + dc->hotpluggable = false; +} + +static const TypeInfo ap_device_info = { + .name = AP_DEVICE_TYPE, + .parent = TYPE_DEVICE, + .instance_size = sizeof(APDevice), + .class_size = sizeof(DeviceClass), + .class_init = ap_class_init, + .abstract = true, +}; + +static void ap_device_register(void) +{ + type_register_static(&ap_device_info); +} + +type_init(ap_device_register) |