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

2021-02-11 Thread Tony Krowiak
On 2/11/21 11:47 AM, Halil Pasic wrote: On Thu, 11 Feb 2021 09:21:26 -0500 Tony Krowiak wrote: Yes, it makes sense. I guess I didn't look closely at your suggestion when I said it was exactly what I implemented after agreeing with Connie. I had a slight difference in my implementation:

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

2021-02-11 Thread Halil Pasic
On Thu, 11 Feb 2021 09:21:26 -0500 Tony Krowiak wrote: > Yes, it makes sense. I guess I didn't look closely at your > suggestion when I said it was exactly what I implemented > after agreeing with Connie. I had a slight difference in > my implementation: > > static void

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

2021-02-11 Thread Tony Krowiak
On 2/11/21 7:23 AM, Cornelia Huck wrote: On Wed, 10 Feb 2021 15:34:24 -0500 Tony Krowiak wrote: On 2/10/21 5:53 AM, Cornelia Huck wrote: On Tue, 9 Feb 2021 14:48:30 -0500 Tony Krowiak wrote: This patch fixes a circular locking dependency in the CI introduced by commit f21916ec4826

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

2021-02-11 Thread Tony Krowiak
On 2/10/21 5:46 PM, Halil Pasic wrote: On Wed, 10 Feb 2021 17:05:48 -0500 Tony Krowiak wrote: On 2/10/21 10:32 AM, Halil Pasic wrote: On Wed, 10 Feb 2021 16:24:29 +0100 Halil Pasic wrote: Maybe you could - grab a reference to kvm while holding the lock - call the mask handling

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

2021-02-11 Thread Cornelia Huck
On Wed, 10 Feb 2021 15:34:24 -0500 Tony Krowiak wrote: > On 2/10/21 5:53 AM, Cornelia Huck wrote: > > On Tue, 9 Feb 2021 14:48:30 -0500 > > Tony Krowiak wrote: > > > >> This patch fixes a circular locking dependency in the CI introduced by > >> commit f21916ec4826 ("s390/vfio-ap: clean up

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

2021-02-10 Thread Halil Pasic
On Wed, 10 Feb 2021 17:05:48 -0500 Tony Krowiak wrote: > On 2/10/21 10:32 AM, Halil Pasic wrote: > > On Wed, 10 Feb 2021 16:24:29 +0100 > > Halil Pasic wrote: > > > >>> Maybe you could > >>> - grab a reference to kvm while holding the lock > >>> - call the mask handling functions with that

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

2021-02-10 Thread Tony Krowiak
On 2/10/21 10:24 AM, Halil Pasic wrote: On Wed, 10 Feb 2021 11:53:34 +0100 Cornelia Huck wrote: On Tue, 9 Feb 2021 14:48:30 -0500 Tony Krowiak wrote: This patch fixes a circular locking dependency in the CI introduced by commit f21916ec4826 ("s390/vfio-ap: clean up vfio_ap resources

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

2021-02-10 Thread Tony Krowiak
On 2/10/21 10:32 AM, Halil Pasic wrote: On Wed, 10 Feb 2021 16:24:29 +0100 Halil Pasic wrote: Maybe you could - grab a reference to kvm while holding the lock - call the mask handling functions with that kvm reference - lock again, drop the reference, and do the rest of the processing? I

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

2021-02-10 Thread Tony Krowiak
On 2/10/21 5:53 AM, Cornelia Huck wrote: On Tue, 9 Feb 2021 14:48:30 -0500 Tony Krowiak wrote: This patch fixes a circular locking dependency in the CI introduced by commit f21916ec4826 ("s390/vfio-ap: clean up vfio_ap resources when KVM pointer invalidated"). The lockdep only occurs when

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

2021-02-10 Thread Halil Pasic
On Wed, 10 Feb 2021 16:24:29 +0100 Halil Pasic wrote: > > Maybe you could > > - grab a reference to kvm while holding the lock > > - call the mask handling functions with that kvm reference > > - lock again, drop the reference, and do the rest of the processing? > > I agree, matrix_mdev->kvm

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

2021-02-10 Thread Halil Pasic
On Wed, 10 Feb 2021 11:53:34 +0100 Cornelia Huck wrote: > On Tue, 9 Feb 2021 14:48:30 -0500 > Tony Krowiak wrote: > > > This patch fixes a circular locking dependency in the CI introduced by > > commit f21916ec4826 ("s390/vfio-ap: clean up vfio_ap resources when KVM > > pointer invalidated").

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

2021-02-10 Thread Cornelia Huck
On Tue, 9 Feb 2021 14:48:30 -0500 Tony Krowiak wrote: > This patch fixes a circular locking dependency in the CI introduced by > commit f21916ec4826 ("s390/vfio-ap: clean up vfio_ap resources when KVM > pointer invalidated"). The lockdep only occurs when starting a Secure > Execution guest.

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

2021-02-09 Thread Tony Krowiak
This patch fixes a circular locking dependency in the CI introduced by commit f21916ec4826 ("s390/vfio-ap: clean up vfio_ap resources when KVM pointer invalidated"). The lockdep only occurs when starting a Secure Execution guest. Crypto virtualization (vfio_ap) is not yet supported for SE guests;