qemu-e2k/hw/s390x/ap-device.c
Tony Krowiak a51b31535a 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>
2018-10-12 11:32:18 +02:00

39 lines
888 B
C

/*
* 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)