From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [PATCH v11 13/26] s390: vfio-ap: zeroize the AP queues Date: Thu, 27 Sep 2018 09:04:28 +0200 Message-ID: <20180927090428.5d96d7c0.cohuck@redhat.com> References: <20180925231641.4954-1-akrowiak@linux.vnet.ibm.com> <20180925231641.4954-14-akrowiak@linux.vnet.ibm.com> <20180926153831.195af1ce.cohuck@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Tony Krowiak , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, kwankhede@nvidia.com, bjsdjshi@linux.vnet.ibm.com, pbonzini@redhat.com, alex.williamson@redhat.com, pmorel@linux.vnet.ibm.com, alifm@linux.vnet.ibm.com, mjrosato@linux.vnet.ibm.com, jjherne@linux.vnet.ibm.com, thuth@redhat.com, pasic@linux.vnet.ibm.com, berrange@redhat.com, fiuczy@linux.vnet.ibm.com, buendgen@de.ibm.com, frankja@linux.ibm.com, Tony Krowiak To: Christian Borntraeger Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Wed, 26 Sep 2018 20:58:41 +0200 Christian Borntraeger wrote: > On 09/26/2018 03:38 PM, Cornelia Huck wrote: > > On Tue, 25 Sep 2018 19:16:28 -0400 > > Tony Krowiak wrote: > > > >> From: Tony Krowiak > >> > >> Let's call PAPQ(ZAPQ) to zeroize a queue for each queue configured > >> for a mediated matrix device when it is released. > >> > >> Zeroizing a queue resets the queue, clears all pending > >> messages for the queue entries and disables adapter interruptions > >> associated with the queue. > >> > >> Signed-off-by: Tony Krowiak > >> Reviewed-by: Halil Pasic > >> Tested-by: Michael Mueller > >> Tested-by: Farhan Ali > >> --- > >> drivers/s390/crypto/vfio_ap_ops.c | 44 +++++++++++++++++++++++++++++++ > >> 1 file changed, 44 insertions(+) (...) > >> +static int vfio_ap_mdev_reset_queues(struct mdev_device *mdev) > >> +{ > >> + int ret; > >> + int rc = 0; > >> + unsigned long apid, apqi; > >> + struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); > >> + > >> + for_each_set_bit_inv(apid, matrix_mdev->matrix.apm, > >> + matrix_mdev->matrix.apm_max + 1) { > >> + for_each_set_bit_inv(apqi, matrix_mdev->matrix.aqm, > >> + matrix_mdev->matrix.aqm_max + 1) { > >> + ret = vfio_ap_mdev_reset_queue(apid, apqi, 1); > > > > I'd still like to see a comment here: > > > > /* > > * Regardless whether a queue turns out to be busy, or is not > > * operational, we need to continue resetting the remaining > > * queues. > > */ > > I added your proposal to the apv11 branch. Thanks. With that added, Reviewed-by: Cornelia Huck