Message ID | 20240115185441.31526-4-akrowiak@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | s390/vfio-ap: reset queues removed from guest's AP configuration | expand |
On Mon, Jan 15, 2024 at 01:54:33PM -0500, Tony Krowiak wrote: Hi Tony, > Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com> > Reviewed-by: Halil Pasic <pasic@linux.ibm.com> No Fixes tag for this patch? Thanks!
On 1/16/24 3:34 AM, Alexander Gordeev wrote: > On Mon, Jan 15, 2024 at 01:54:33PM -0500, Tony Krowiak wrote: > Hi Tony, > >> Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com> >> Reviewed-by: Halil Pasic <pasic@linux.ibm.com> > No Fixes tag for this patch? This patch is more of an enhancement as opposed to a bug, so no Fixes. > > Thanks! >
On Tue, Jan 16, 2024 at 09:57:25AM -0500, Tony Krowiak wrote:
> This patch is more of an enhancement as opposed to a bug, so no Fixes.
The preceding and rest of this series CCs stable@vger.kernel.org and
would not apply without this patch. So I guess backporting the whole
series would be difficult.
Whether propagating the prevous patches' Fixes/stable makes any sense?
Thanks!
On 1/16/24 10:53 AM, Alexander Gordeev wrote: > On Tue, Jan 16, 2024 at 09:57:25AM -0500, Tony Krowiak wrote: >> This patch is more of an enhancement as opposed to a bug, so no Fixes. > The preceding and rest of this series CCs stable@vger.kernel.org and > would not apply without this patch. So I guess backporting the whole > series would be difficult. > > Whether propagating the prevous patches' Fixes/stable makes any sense? Let's put it this way; it doesn't not make sense to make this patch Fixes/stable. To make life easier to apply the whole series, go ahead and add the Fixes/stable tags. > > Thanks!
diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c index e825e13847fe..e45d0bf7b126 100644 --- a/drivers/s390/crypto/vfio_ap_ops.c +++ b/drivers/s390/crypto/vfio_ap_ops.c @@ -2101,9 +2101,22 @@ int vfio_ap_mdev_probe_queue(struct ap_device *apdev) if (matrix_mdev) { vfio_ap_mdev_link_queue(matrix_mdev, q); + /* + * If we're in the process of handling the adding of adapters or + * domains to the host's AP configuration, then let the + * vfio_ap device driver's on_scan_complete callback filter the + * matrix and update the guest's AP configuration after all of + * the new queue devices are probed. + */ + if (!bitmap_empty(matrix_mdev->apm_add, AP_DEVICES) || + !bitmap_empty(matrix_mdev->aqm_add, AP_DOMAINS)) + goto done; + if (vfio_ap_mdev_filter_matrix(matrix_mdev)) vfio_ap_mdev_update_guest_apcb(matrix_mdev); } + +done: dev_set_drvdata(&apdev->device, q); release_update_locks_for_mdev(matrix_mdev);