#include "hw/vfio/vfio-common.h"
#include "hw/s390x/ap-device.h"
#include "qemu/error-report.h"
-#include "qemu/queue.h"
+#include "qemu/module.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "cpu.h"
#include "kvm_s390x.h"
-#include "sysemu/sysemu.h"
+#include "migration/vmstate.h"
+#include "hw/qdev-properties.h"
#include "hw/s390x/ap-bridge.h"
#include "exec/address-spaces.h"
{
int ret;
char *mdevid;
- Error *local_err = NULL;
VFIOGroup *vfio_group;
APDevice *apdev = AP_DEVICE(dev);
VFIOAPDevice *vapdev = VFIO_AP_DEVICE(apdev);
- vfio_group = vfio_ap_get_group(vapdev, &local_err);
+ vfio_group = vfio_ap_get_group(vapdev, errp);
if (!vfio_group) {
- goto out_err;
+ return;
}
vapdev->vdev.ops = &vfio_ap_ops;
*/
vapdev->vdev.balloon_allowed = true;
- ret = vfio_get_device(vfio_group, mdevid, &vapdev->vdev, &local_err);
+ ret = vfio_get_device(vfio_group, mdevid, &vapdev->vdev, errp);
if (ret) {
goto out_get_dev_err;
}
out_get_dev_err:
vfio_ap_put_device(vapdev);
vfio_put_group(vfio_group);
-out_err:
- error_propagate(errp, local_err);
}
static void vfio_ap_unrealize(DeviceState *dev, Error **errp)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- dc->props = vfio_ap_properties;
+ device_class_set_props(dc, vfio_ap_properties);
dc->vmsd = &vfio_ap_vmstate;
dc->desc = "VFIO-based AP device assignment";
set_bit(DEVICE_CATEGORY_MISC, dc->categories);