Received: by 10.213.65.68 with SMTP id h4csp1837243imn; Thu, 29 Mar 2018 11:59:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/P/R3Usj+Hl/HeF7A4O8MJRIk6ELm5ZtCEN8M229qBVqxufdH5/QJHediKW9VUQu8nWf8u X-Received: by 2002:a17:902:5489:: with SMTP id e9-v6mr9638774pli.306.1522349948761; Thu, 29 Mar 2018 11:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522349948; cv=none; d=google.com; s=arc-20160816; b=yct4Ph/F7wdPCzyoFt72pAEL633H5pa4hCkURYOm0Nrqsagl7BH6ts2EYUyohGxdgr A5MUW9Lllm4aN+EasERYELkvNFVBswYE/vKp8968hkVn+/y7emn/t4i4pNcHEBCqtGWp tR/t9hohxb53GZlewmXfocBMeN/5O0wH/ZYwuGQqjz+gKsdkLhUPvCXHSVUO3QsaPYeK iBxMIpuTRj2GMIUPReZeqAhwxoCNMBZ3ofX+B0MFbeL19DiJTRJ3ORYm7vHOLp1vNpFP 6f4XX/DL7wQn2cUgsPB/WY1YBbcliTIiTpsLSwkWJPRWetchcsU6FuZlIM7rW3JTtSxG cXLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject:arc-authentication-results; bh=tztbc0vSoyljkZvBUtrEkRJkddOFEo4GfBnrfcZJvEQ=; b=ddKZgZrkJSJwIaaICsoRnZSEU7v0/pBl6YApgbfDKlFPG5xL60i9a4vA4ifG9SQE0A vIMmNmVinNDzMn53tCEnpqZl1cNEOp1vn0eoTpNVf/MgUFzvkRZwisek4PuD/iai0y6Q uzBWpnwi/shIF/Ju6FbhaA8AS1+T0iozRPap2kE/7yyV/53GvYPI+jHnB9N0ivQHufVo qOhU6LxkUA01veT8HFaXEafOLfVCWVZDozKGVtMEu46ShOZIJlpBXOqfU+hoXHNP+igy ixji3BFffHLq5CYSTq1i7IMd9DLde0b5dlETtaD8CBG1jhx8BUQnjqQWZ+0YyhImkjzq fLOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9-v6si6556800plz.161.2018.03.29.11.58.54; Thu, 29 Mar 2018 11:59:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752288AbeC2S5d (ORCPT + 99 others); Thu, 29 Mar 2018 14:57:33 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39690 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751249AbeC2S5b (ORCPT ); Thu, 29 Mar 2018 14:57:31 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2TIvNIe045285 for ; Thu, 29 Mar 2018 14:57:30 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2h15uc02u5-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 29 Mar 2018 14:57:30 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Mar 2018 14:57:29 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 29 Mar 2018 14:57:24 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2TIvNLZ62718110; Thu, 29 Mar 2018 18:57:23 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC63D124035; Thu, 29 Mar 2018 15:59:30 -0400 (EDT) Received: from oc8043147753.ibm.com (unknown [9.85.175.177]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id B493912403F; Thu, 29 Mar 2018 15:59:29 -0400 (EDT) Subject: Re: [PATCH v3 01/14] KVM: s390: refactor crypto initialization To: Cornelia Huck , Pierre Morel Cc: 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, 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 References: <1521051954-25715-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1521051954-25715-2-git-send-email-akrowiak@linux.vnet.ibm.com> <3227b02e-4a16-295d-9a01-043702cf149d@linux.vnet.ibm.com> <20180326104455.7773be7b.cohuck@redhat.com> From: Tony Krowiak Date: Thu, 29 Mar 2018 14:57:22 -0400 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: <20180326104455.7773be7b.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: 18032918-0008-0000-0000-000002ECE9E3 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008766; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000255; SDB=6.01010227; UDB=6.00514694; IPR=6.00789506; MB=3.00020316; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-29 18:57:27 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18032918-0009-0000-0000-000038B84B14 Message-Id: <5c659a5e-1933-366b-65fc-6e9eabe504d5@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-29_11:,, 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=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803290196 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/26/2018 04:44 AM, Cornelia Huck wrote: > On Thu, 15 Mar 2018 15:55:39 +0100 > Pierre Morel wrote: > >> On 15/03/2018 15:48, Tony Krowiak wrote: >>> On 03/15/2018 08:26 AM, Pierre Morel wrote: >>>> On 14/03/2018 19:25, Tony Krowiak wrote: >>>>> diff --git a/arch/s390/kvm/Kconfig b/arch/s390/kvm/Kconfig >>>>> index a3dbd45..4ca9077 100644 >>>>> --- a/arch/s390/kvm/Kconfig >>>>> +++ b/arch/s390/kvm/Kconfig >>>>> @@ -33,6 +33,7 @@ config KVM >>>>> select HAVE_KVM_INVALID_WAKEUPS >>>>> select SRCU >>>>> select KVM_VFIO >>>>> + select ZCRYPT >>>> I do not think it is a good solution to *always* enable ZCRYPT >>>> when we have KVM. >>> If CONFIG_ZCRYPT is not selected, then the kvm_ap_apxa_installed() >>> function will not compile >>> because it calls a zcrypt interface. How would you suggest we make >>> sure zcrypt interfaces >>> used in KVM are built if CONFIG_ZCRYPT is not selected? >> if zcrypt is not configured, I suppose that the KVM code initializaing CRYCB >> has no use but the function will be called from KVM. >> So I would do something like: >> >> #ifdef ZCRYPT >> external definitions. >> #else >> stubs returning error -ENOZCRYPT (or whatever) >> #endif > The kvm code used some kind of detection for crycb before (IIRC it was > for the key-wrapping stuff). I assume that usage is independent of > zcrypt driver usage in the host? A function in kvm-s390.c was replaced with a call to the function in ap_bus.c that was externalized in patch 2/14. This was done to remove duplicate code. Since zcrypt is built into the kernel, I didn't think it would be a problem, but apparently because of the way zcrypt is configured, it is still possible to remove it from the kernel build. > > So, I think that apxa detection function should be used to s390 > architecture base code and not be conditional on anything. I am convinced that the original function from kvm_s390.c should be restored. >