Re: [PATCH v4 1/1] s390/vfio-ap: fix circular lockdep when setting/clearing crypto masks

2021-03-18 Thread Halil Pasic
On Thu, 18 Mar 2021 14:38:53 -0400 Tony Krowiak wrote: > On 3/17/21 7:17 PM, Halil Pasic wrote: > > On Wed, 10 Mar 2021 10:05:59 -0500 > > Tony Krowiak wrote: > > > >> - ret = vfio_ap_mdev_reset_queues(mdev); > >> + matrix_mdev = mdev_get_drvdata(mdev); > > Is it

Re: [PATCH v4 1/1] s390/vfio-ap: fix circular lockdep when setting/clearing crypto masks

2021-03-18 Thread Halil Pasic
On Thu, 18 Mar 2021 13:54:06 -0400 Tony Krowiak wrote: > > Is it guaranteed that matrix_mdev can't be NULL here? If yes, please > > remind me of the mechanism that ensures this. > > The matrix_mdev is set as drvdata when the mdev is created and > is only cleared when the mdev is removed.

Re: [PATCH v4 1/1] s390/vfio-ap: fix circular lockdep when setting/clearing crypto masks

2021-03-18 Thread Tony Krowiak
On 3/17/21 7:17 PM, Halil Pasic wrote: On Wed, 10 Mar 2021 10:05:59 -0500 Tony Krowiak wrote: - ret = vfio_ap_mdev_reset_queues(mdev); + matrix_mdev = mdev_get_drvdata(mdev); Is it guaranteed that matrix_mdev can't be NULL here? If yes, please remind me of the

Re: [PATCH v4 1/1] s390/vfio-ap: fix circular lockdep when setting/clearing crypto masks

2021-03-18 Thread Tony Krowiak
On 3/17/21 7:17 PM, Halil Pasic wrote: On Wed, 10 Mar 2021 10:05:59 -0500 Tony Krowiak wrote: - ret = vfio_ap_mdev_reset_queues(mdev); + matrix_mdev = mdev_get_drvdata(mdev); Is it guaranteed that matrix_mdev can't be NULL here? If yes, please remind me of the

Re: [PATCH v4 1/1] s390/vfio-ap: fix circular lockdep when setting/clearing crypto masks

2021-03-17 Thread Halil Pasic
On Wed, 10 Mar 2021 10:05:59 -0500 Tony Krowiak wrote: > - ret = vfio_ap_mdev_reset_queues(mdev); > + matrix_mdev = mdev_get_drvdata(mdev); Is it guaranteed that matrix_mdev can't be NULL here? If yes, please remind me of the mechanism that ensures this. > + > +

[PATCH v4 1/1] s390/vfio-ap: fix circular lockdep when setting/clearing crypto masks

2021-03-10 Thread Tony Krowiak
This patch fixes a lockdep splat introduced by commit f21916ec4826 ("s390/vfio-ap: clean up vfio_ap resources when KVM pointer invalidated"). The lockdep splat only occurs when starting a Secure Execution guest. Crypto virtualization (vfio_ap) is not yet supported for SE guests; however, in order