Received: by 10.213.65.68 with SMTP id h4csp1082300imn; Wed, 14 Mar 2018 09:05:16 -0700 (PDT) X-Google-Smtp-Source: AG47ELu7s4+50tZdJ9YxDZiMuZvLpH1p5yNGbhwIlYLqtXmIsn5gFBZST00du+o7R5cs4kdxrb0P X-Received: by 2002:a17:902:8d8d:: with SMTP id v13-v6mr4558793plo.149.1521043516023; Wed, 14 Mar 2018 09:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521043515; cv=none; d=google.com; s=arc-20160816; b=tdr/MjJmlGeRbPE3K5GAQ2pOqMzycJcPlSBOal7Bmfq55IUQv5atAfcUTt30LHesNJ RgUz86DbHixSD88tuklmlFIjNvrNfTe4du2PWtTzqZIp2LX2idTBj1xP9xcXs8NPlWCF sC6L6uUvLrppyqAYJEIe20tiRjRdxbIKET466btfjY+Okwem7t14ru4tCDlalHkZYVhY ASguZqUOejo5ck8g4BYf45qzqgJsIZbiWkCjwTgB4gBD1TWsyR1TXuwBb8GWXefrcBaG 9CPJa2Wp8cOkHaUwIawYii+fgBWRJmbbscrrhS5M43D9GGNeRBbK9HT2L8BrnWis0UX8 c8eA== 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=ZM9qryx6tbb4wrPuraPIExH8olxgTCmbbbF4m2dqVzc=; b=a+dqiiZ3KwxN3G8D7cVMDXkCV6KC1Dze6Hgc4fUvp/kt8zkLdPeMnwz57MQAplZmvM KBvWnSfPHKui5suGcFe5C7oKv7zkejmggECh48+QV+4scsPZvUSniFqVH1uKEiK1uMB1 CKc5w5EBvPjONNQc3mcrofF1cfHwiWCazrAqQXBmMprF81ibG+LStisi2syyRE2J8OPM pdwRWglbhxNYVXKllvRR0oMvSBi4lh13Vp4hsXOY59OCs6ZqTzJcGqukuJrMn0I9CQ74 feND3IYBbV4o366VTuAX9MZfc+JBumqUEYG0DUjCJCAZ/0Z4PhYfod8xAfe9lvBlPCHj KlAA== 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 197si2062734pge.78.2018.03.14.09.04.38; Wed, 14 Mar 2018 09:05:15 -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 S1752593AbeCNQCW (ORCPT + 99 others); Wed, 14 Mar 2018 12:02:22 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46184 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752096AbeCNQCV (ORCPT ); Wed, 14 Mar 2018 12:02:21 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2EG1bhW113264 for ; Wed, 14 Mar 2018 12:02:20 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gq5fk4dat-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 14 Mar 2018 12:02:20 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Mar 2018 12:02:12 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Mar 2018 12:02:08 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2EG27fn57802896; Wed, 14 Mar 2018 16:02:07 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EDD9012404E; Wed, 14 Mar 2018 13:04:18 -0400 (EDT) Received: from oc8043147753.ibm.com (unknown [9.85.151.171]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id 971D2124035; Wed, 14 Mar 2018 13:04:17 -0400 (EDT) Subject: Re: [PATCH v2 01/15] KVM: s390: refactor crypto initialization To: Cornelia Huck 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, 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, fiuczy@linux.vnet.ibm.com, buendgen@de.ibm.com References: <1519741693-17440-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1519741693-17440-2-git-send-email-akrowiak@linux.vnet.ibm.com> <20180228183741.5276e3d3.cohuck@redhat.com> <20180301105915.5c871524.cohuck@redhat.com> From: Tony Krowiak Date: Wed, 14 Mar 2018 12:02:05 -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: <20180301105915.5c871524.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: 18031416-2213-0000-0000-0000027F731A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008673; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01002977; UDB=6.00510395; IPR=6.00782307; MB=3.00020033; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-14 16:02:11 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031416-2214-0000-0000-000059697F63 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-14_08:,, 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-1803140181 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/01/2018 04:59 AM, Cornelia Huck wrote: > On Wed, 28 Feb 2018 16:23:29 -0500 > Tony Krowiak wrote: > >> On 02/28/2018 12:37 PM, Cornelia Huck wrote: >>> On Tue, 27 Feb 2018 09:27:59 -0500 >>> Tony Krowiak wrote: >>>> diff --git a/arch/s390/kvm/kvm-ap.c b/arch/s390/kvm/kvm-ap.c >>>> new file mode 100644 >>>> index 0000000..5305f4c >>>> --- /dev/null >>>> +++ b/arch/s390/kvm/kvm-ap.c >>>> @@ -0,0 +1,47 @@ >>>> +/* >>>> + * Adjunct Processor (AP) configuration management for KVM guests >>>> + * >>>> + * Copyright IBM Corp. 2017 >>>> + * >>>> + * Author(s): Tony Krowiak >>>> + */ >>>> + >>>> +#include >>>> +#include >>>> + >>>> +#include "kvm-s390.h" >>>> + >>>> +static int kvm_ap_apxa_installed(void) >>>> +{ >>>> + int ret; >>>> + struct ap_config_info config; >>>> + >>>> + ret = ap_query_configuration(&config); >>> Doesn't that introduce a dependency on CONFIG_ZCRYPT? >> It does, but AFAIK zcrypt is built into the kernel. Or is that not what >> you are asking? > It is built into the kernel (and not into a module) if CONFIG_ZCRYPT is > set. When I compile a kernel with CONFIG_KVM set and CONFIG_ZCRYPT > unset, with this patch applied I get > > arch/s390/kvm/kvm-ap.o: In function `kvm_ap_apxa_installed': > /home/cohuck/git/linux/arch/s390/kvm/kvm-ap.c:19: undefined reference to `ap_query_configuration' > > So I'm afraid you cannot use ap_query_configuration() in base s390 kvm > code unless you move that function to a place where it is always built > (or at least always built if either CONFIG_KVM or CONFIG_ZCRYPT are > set). I was able to get around this by inserting the following into arch/s390/kvm/Kconfig: config KVM def_tristate y prompt "Kernel-based Virtual Machine (KVM) support" depends on HAVE_KVM select PREEMPT_NOTIFIERS ... select ZCRYPT If this is a problem, we can discuss it in the v3 which is forthcoming very shortly >