Received: by 10.213.65.68 with SMTP id h4csp1157775imn; Mon, 26 Mar 2018 01:46:26 -0700 (PDT) X-Google-Smtp-Source: AG47ELsgUrK177l/0SmJcIgEiEFW14ZLg/kywVOBebgb5lYVJUFs+OyDvD5AW9nDt5kAWvChtzlf X-Received: by 2002:a17:902:228:: with SMTP id 37-v6mr39889268plc.141.1522053986474; Mon, 26 Mar 2018 01:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522053986; cv=none; d=google.com; s=arc-20160816; b=FIAhmJ85E0YF18lgLkcXU4e1H1zI/fc2veyFrlkE+d7Z+9b63M2lotrUuO+tM3xE4T rwllnm8HnDxNIIdB1avA7T48S3edd0/XFePlUyH4D6RLwFk654cSV8UGttI8rT/SzQgz ccseHqk5F4WrLeJsUVXFHJ/hlMP0YwwTYZmKubL7KjmXN4MmKA55SfLDY/iCYfbENYBT HSD4ooDMxqO7ilZ/ahME6Gyd/YRIH/oUbaeQBlPjUArodSv/0tGxPCvRF5yrhk/XomIJ L+D/QM3qTLkAn/GwlUbCTYd6HaXuLGcdiKMjQLztta6Kn7EXm9Gb9eAle9vwxBNgLuCD 1Glg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=hU8xFwaonOOWSEdtW9tgMpL1bB7zvhXcDst4GS2yMOQ=; b=UxzKSECtS774XSqq73CqbjyzUtak6QAajhILfmlY324IqWVrUq+FIqV2JLhpKebGjQ uU0QloaoTDJHynrW8s71AuX1//vfz7FBOqfaaMjqXJ5gjSs2ev6pefYZXGiaLUnyUNn1 sHntXz/9jLParwR/Z0nDPjTt2nLmPRCRTD0b3c+1148NtQ9YfqMdJUUizhwIVkpMA1TD +yOCTcCx3IJs/4u/hER1vhFLOygjg/4YyMwWaljGsMvUPVKwSiw7ZR9ix8zhpBdADk1c Hyt5djlSCNsQMlMUEUt1MoCKmEiEI/qelWWBjUMeL3OEiUXoRNORH1HbTOxaz0HQXnQR aBSA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f27si9915974pga.389.2018.03.26.01.46.12; Mon, 26 Mar 2018 01:46:26 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751765AbeCZIpO convert rfc822-to-8bit (ORCPT + 99 others); Mon, 26 Mar 2018 04:45:14 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57728 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750983AbeCZIpC (ORCPT ); Mon, 26 Mar 2018 04:45:02 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 13E10406F8BE; Mon, 26 Mar 2018 08:45:01 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFE1E215CDAA; Mon, 26 Mar 2018 08:44:57 +0000 (UTC) Date: Mon, 26 Mar 2018 10:44:55 +0200 From: Cornelia Huck To: Pierre Morel 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, 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 Subject: Re: [PATCH v3 01/14] KVM: s390: refactor crypto initialization Message-ID: <20180326104455.7773be7b.cohuck@redhat.com> In-Reply-To: <3227b02e-4a16-295d-9a01-043702cf149d@linux.vnet.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> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 26 Mar 2018 08:45:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 26 Mar 2018 08:45:01 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'cohuck@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? So, I think that apxa detection function should be used to s390 architecture base code and not be conditional on anything.