On 10/09/2018 03:51 PM, David Hildenbrand wrote:
+static void vfio_ap_realize(DeviceState *dev, Error **errp)
+{
+ 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);
+ if (!vfio_group) {
+ goto out_err;
+ }
+
+ vapdev->vdev.ops = &vfio_ap_ops;
+ vapdev->vdev.type = VFIO_DEVICE_TYPE_AP;
+ mdevid = basename(vapdev->vdev.sysfsdev);
+ vapdev->vdev.name = g_strdup_printf("%s", mdevid);
+ vapdev->vdev.dev = dev;
+
+ ret = vfio_get_device(vfio_group, mdevid, &vapdev->vdev, &local_err);
+ if (ret) {
+ goto out_get_dev_err;
+ }
+
+ /* Enable hardware to intepret AP instructions executed on the guest */
+ object_property_set_bool(OBJECT(qdev_get_machine()), true, "apie", NULL);
+
I commented on the old version that this is wrong (if I am not starting
to lose my memory). This has to go. (there is no such property, this
will simply report an error we ignore)
(can most probably be fixed when applying)
I don't recall whether you mentioned it, but I will fix it, or it can be
fixed when applied .... Connie?