ap-device.c 867 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Adjunct Processor (AP) matrix device
  3. *
  4. * Copyright 2018 IBM Corp.
  5. *
  6. * This work is licensed under the terms of the GNU GPL, version 2 or (at
  7. * your option) any later version. See the COPYING file in the top-level
  8. * directory.
  9. */
  10. #include "qemu/osdep.h"
  11. #include "qemu/module.h"
  12. #include "qapi/error.h"
  13. #include "hw/s390x/ap-device.h"
  14. static void ap_class_init(ObjectClass *klass, void *data)
  15. {
  16. DeviceClass *dc = DEVICE_CLASS(klass);
  17. dc->desc = "AP device class";
  18. dc->hotpluggable = false;
  19. }
  20. static const TypeInfo ap_device_info = {
  21. .name = TYPE_AP_DEVICE,
  22. .parent = TYPE_DEVICE,
  23. .instance_size = sizeof(APDevice),
  24. .class_size = sizeof(DeviceClass),
  25. .class_init = ap_class_init,
  26. .abstract = true,
  27. };
  28. static void ap_device_register(void)
  29. {
  30. type_register_static(&ap_device_info);
  31. }
  32. type_init(ap_device_register)