From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752084AbdJPJO1 (ORCPT ); Mon, 16 Oct 2017 05:14:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57626 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbdJPJOY (ORCPT ); Mon, 16 Oct 2017 05:14:24 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6FB8F4E4CA Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com Date: Mon, 16 Oct 2017 11:14:20 +0200 From: Cornelia Huck To: Dong Jia Shi Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, borntraeger@de.ibm.com, pasic@linux.vnet.ibm.com, pmorel@linux.vnet.ibm.com Subject: Re: [PATCH 2/2] vfio: ccw: validate the count field of a ccw before pinning Message-ID: <20171016111420.4a8ca1af.cohuck@redhat.com> In-Reply-To: <20171011023822.42948-3-bjsdjshi@linux.vnet.ibm.com> References: <20171011023822.42948-1-bjsdjshi@linux.vnet.ibm.com> <20171011023822.42948-3-bjsdjshi@linux.vnet.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 16 Oct 2017 09:14:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Oct 2017 04:38:22 +0200 Dong Jia Shi wrote: > If the count field of a ccw is zero, there is no need to > try to pin page(s) for it. Let's check the count value > before starting pinning operations. > > Reviewed-by: Pierre Morel > Signed-off-by: Dong Jia Shi > --- > drivers/s390/cio/vfio_ccw_cp.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) This sounds reasonable, and I could not spot anything in the architecture that speaks against simply setting the IDA flag. Hopefully there's nothing buried out of sight :)