From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762242AbdKQVOD (ORCPT ); Fri, 17 Nov 2017 16:14:03 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58284 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753926AbdKQVNz (ORCPT ); Fri, 17 Nov 2017 16:13:55 -0500 Subject: Re: [RFC 05/19] s390/zcrypt: base implementation of AP matrix device driver To: Cornelia Huck Cc: Pierre Morel , 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, borntraeger@de.ibm.com, kwankhede@nvidia.com, bjsdjshi@linux.vnet.ibm.com, pbonzini@redhat.com, alex.williamson@redhat.com, alifm@linux.vnet.ibm.com, mjrosato@linux.vnet.ibm.com, qemu-s390x@nongnu.org, jjherne@linux.vnet.ibm.com, thuth@redhat.com, pasic@linux.vnet.ibm.com References: <1507916344-3896-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1507916344-3896-6-git-send-email-akrowiak@linux.vnet.ibm.com> <20171114134040.3fcd6efd.cohuck@redhat.com> <06ddee4e-e1b8-ba17-5e3e-241e4dcf7cd0@linux.vnet.ibm.com> <20171116133531.1135a093.cohuck@redhat.com> <20171116174741.18e3f40b.cohuck@redhat.com> From: Tony Krowiak Date: Fri, 17 Nov 2017 16:13:45 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20171116174741.18e3f40b.cohuck@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 17111721-0048-0000-0000-00000207CBF6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008084; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000240; SDB=6.00947340; UDB=6.00478278; IPR=6.00727632; BA=6.00005698; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018069; XFM=3.00000015; UTC=2017-11-17 21:13:51 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17111721-0049-0000-0000-000043348CB9 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-17_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711170285 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/16/2017 11:47 AM, Cornelia Huck wrote: > On Thu, 16 Nov 2017 09:25:27 -0500 > Tony Krowiak wrote: > >> On 11/16/2017 07:35 AM, Cornelia Huck wrote: >>> On Thu, 16 Nov 2017 13:02:26 +0100 >>> Pierre Morel wrote: >>> >>>> On 14/11/2017 17:37, Tony Krowiak wrote: >>>>> On 11/14/2017 07:40 AM, Cornelia Huck wrote: >>>>>> On Fri, 13 Oct 2017 13:38:50 -0400 >>>>>> Tony Krowiak wrote: >>>>>>> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig >>>>>>> index 48af970..411c19a 100644 >>>>>>> --- a/arch/s390/Kconfig >>>>>>> +++ b/arch/s390/Kconfig >>>>>>> @@ -722,6 +722,19 @@ config VFIO_CCW >>>>>>> To compile this driver as a module, choose M here: the >>>>>>> module will be called vfio_ccw. >>>>>>> +config VFIO_AP_MATRIX >>>>>>> + def_tristate m >>>>>>> + prompt "Support for Adjunct Processor Matrix device interface" >>>>>>> + depends on ZCRYPT >>>>>>> + select VFIO >>>>>>> + select MDEV >>>>>>> + select VFIO_MDEV >>>>>>> + select VFIO_MDEV_DEVICE >>>>>>> + select IOMMU_API >>>>>> I think the more common pattern is to depend on the VFIO configs >>>>>> instead of selecting them. >>>>> It's ironic because I originally changed from using 'depends on' and >>>>> changed it based on review comments made >>>>> on our internal mailing list. I'll go with 'depends on'. >>>> Is doing like the others a sufficient good reason? >>>> What if the first who did this did not really think about it? >>>> >>>> When an administrator configure the kernel what does he think? >>>> >>>> - I want to have AP through AP_VFIO in my guests >>>> and he get implicitly VFIO >>>> or >>>> - I want to have VFIO >>>> and he has to explicitly add AP_VFIO too >>>> >>>> It seems to me that the first is much more user friendly. >>>> >>>> Please tell me if I missed something. dependencies? collateral damages? >>>> my logic is wrong? >>> Using select for anything that's not a simple infrastructure dependency >>> may lead into trouble (we've had issues in the past where options tried >>> to enable other options but missed dependencies). >>> >>> If a user wants to use vfio-ap, I think it is reasonable to expect them >>> to figure out that they need both ap and vfio for that. >>> >>> [And config help has gotten much better than it was years ago; it's not >>> that hard to figure out what is actually needed.] >> Is it sufficient to specify 'depends on ZCRYPT && VFIO_MDEV_DEVICE' >> since 'VFIO_MDEV_DEVICE depends on VFIO && VFIO_MDEV' and 'VFIO_MDEV >> depends on VFIO' and 'VFIO depends on IOMMU_API'? > Perhaps ZCRYPT && VFIO_MDEV && VFIO_MDEV_DEVICE, to make it a bit more > obvious? Sure, why not. > > [Also, is IOMMU_API only needed to satisfy dependencies?] Yes, VFIO is dependent upon it. >