Store the output of the PQAP(TAPQ) command with the struct vfio_ap_queue object when a queue device is probed. This data can be retrieved from the object passed to the probe callback. Signed-off-by: Anthony Krowiak --- drivers/s390/crypto/vfio_ap_ops.c | 5 ++++- drivers/s390/crypto/vfio_ap_private.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c index 44b3a1dcc1b3..ef3101f6865e 100644 --- a/drivers/s390/crypto/vfio_ap_ops.c +++ b/drivers/s390/crypto/vfio_ap_ops.c @@ -2419,6 +2419,7 @@ int vfio_ap_mdev_probe_queue(struct ap_device *apdev) struct vfio_ap_queue *q; DECLARE_BITMAP(apm_filtered, AP_DEVICES); struct ap_matrix_mdev *matrix_mdev; + struct ap_queue *ap_queue; ret = sysfs_create_group(&apdev->device.kobj, &vfio_queue_attr_group); if (ret) @@ -2430,8 +2431,10 @@ int vfio_ap_mdev_probe_queue(struct ap_device *apdev) goto err_remove_group; } - q->apqn = to_ap_queue(&apdev->device)->qid; + ap_queue = to_ap_queue(&apdev->device); + q->apqn = ap_queue->qid; q->saved_isc = VFIO_AP_ISC_INVALID; + memcpy(&q->hwinfo, &ap_queue->card->hwinfo, sizeof(q->hwinfo)); memset(&q->reset_status, 0, sizeof(q->reset_status)); INIT_WORK(&q->reset_work, apq_reset_check); matrix_mdev = get_update_locks_by_apqn(q->apqn); diff --git a/drivers/s390/crypto/vfio_ap_private.h b/drivers/s390/crypto/vfio_ap_private.h index 9bff666b0b35..39c85bab05c3 100644 --- a/drivers/s390/crypto/vfio_ap_private.h +++ b/drivers/s390/crypto/vfio_ap_private.h @@ -150,6 +150,7 @@ struct vfio_ap_queue { struct list_head reset_qnode; struct ap_queue_status reset_status; struct work_struct reset_work; + struct ap_tapq_hwinfo hwinfo; }; int vfio_ap_mdev_register(void); -- 2.52.0