Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp867128imm; Wed, 22 Aug 2018 14:07:07 -0700 (PDT) X-Google-Smtp-Source: AA+uWPx6avm938cJXkFPb5vE0dNKTE3AYbY+1R2SJEB3/2gNOlv4pgexLpiGW+XB3RpfBc8zlSx/ X-Received: by 2002:a17:902:1745:: with SMTP id i63-v6mr23271891pli.3.1534972027276; Wed, 22 Aug 2018 14:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534972027; cv=none; d=google.com; s=arc-20160816; b=iJaxP0oeIKWle7jFN53snzUto/oaDPb/s8YP0qYjovKQoDJV0eCgZlp1slJgLM/h8P 6corYaxr22XWs7rU8tMdUqBC1Vv9AeOlrcm0E9gMFho2FxdB5+xbs3K6uuV7RyGpk17y 44Mzi0N7UiOt4LtmRNgiPnK7kHE4Dt/sRgPYuL7AZEctnkz9re52VewkH1+pkE3JU0mo L/PXYT45XbGyVYqZPzR2HAHVbzKtXRW1RDv5X3plSr0l/92lx2JbZHn5BxCt8TVuJSEW KTWxdn43coa52sTuvXIC6XpqpQntUFWAuJ1vDoNzi3uDQk/rcqKIVxIsWgEk3FjeuPy+ al3A== 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=m0f5u3l1JAn16ccKDCMzIPdH7aVUUXwTkQ2ZYUSwDKU=; b=CiwIAh7oRUEuR3pUMgKVPlUGSZ3tlbIhUHVFZuDEIxLJXmp1KYzdh4wruhCAuKr996 DSf4EeGIVZQQ3x045dMQy2/8X6KjBBTowEygupU/pkOYYg5QBZPHLaNZfcA3IJTWxp65 1FatJgsNEP4b00MjuHK/h1AVmWio130ppbveFqSXoWLhuKUIqgLjUfiZcX9KWN5DSXMw w75MAJP1zXL0RarsQus7XJYG4HzWslrXh050zFfXjgOy0QHmnbkwpLqH5ky6LKkAUh9G do4jGheuniCbHZWg1sURp2nqaGtbwnpZjvhm47qNAEtNex5FUj6TFGWRb/wGkDMGQiiW +1uA== 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 y123-v6si2773120pfc.302.2018.08.22.14.06.51; Wed, 22 Aug 2018 14:07:07 -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 S1727560AbeHWAcK (ORCPT + 99 others); Wed, 22 Aug 2018 20:32:10 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:60926 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726581AbeHWAcK (ORCPT ); Wed, 22 Aug 2018 20:32:10 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7ML4dp4058529 for ; Wed, 22 Aug 2018 17:05:40 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2m1dx8kb29-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 22 Aug 2018 17:05:40 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 Aug 2018 17:05:39 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 22 Aug 2018 17:05:35 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7ML5Xvh18481202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 22 Aug 2018 21:05:33 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 45C3C2805C; Wed, 22 Aug 2018 17:04:03 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0AC9C28059; Wed, 22 Aug 2018 17:04:02 -0400 (EDT) Received: from oc8043147753.ibm.com (unknown [9.60.75.213]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 22 Aug 2018 17:04:01 -0400 (EDT) Subject: Re: [PATCH v9 21/22] KVM: s390: CPU model support for AP virtualization To: David Hildenbrand , pmorel@linux.ibm.com, Tony Krowiak , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, borntraeger@de.ibm.com, cohuck@redhat.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, berrange@redhat.com, fiuczy@linux.vnet.ibm.com, buendgen@de.ibm.com, frankja@linux.ibm.com References: <1534196899-16987-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1534196899-16987-22-git-send-email-akrowiak@linux.vnet.ibm.com> <2c2c4859-ed3e-a492-dd59-78529c7768b2@redhat.com> <9f512d55-ef10-e2ae-f34e-e003c929bc3f@linux.ibm.com> From: Tony Krowiak Date: Wed, 22 Aug 2018 17:05:31 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18082221-0040-0000-0000-000004637921 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009593; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01077367; UDB=6.00555464; IPR=6.00857343; MB=3.00022874; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-22 21:05:38 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18082221-0041-0000-0000-0000086A8C05 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-22_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=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808220208 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/22/2018 12:57 PM, David Hildenbrand wrote: >>>> In this case we will have no problem with older guests not having idea >>>> about APXA. >>>> >>>> Would it be a solution? >>> Any feature the guest sees, should be part of the CPU model. The whole >>> environment for cpu subfunctions is already in place both in KVM and >>> QEMU. Only disabling subfunctions in KVM is not implemented yet. >>> >>> You can exclude any subfunctions/facilities that are only valid on LPAR >>> level and cannot be used in some guest either way. (that makes life >>> sometimes easier) >>> >>> >>> I know that this might sound a little bit complicated, but it really >>> isn't. Boils down to modifying kvm_s390_cpu_feat_init() and specifying >>> some features+feature groups in QEMU. >> OK, we definitively need another patch/patch-set, to handle this. >> Do you think it can be done in another series since if we always support >> APXA when we have AP instructions, we already have an indication that >> APXA exist: the AP facility. >> > Please implement the subfunction stuff right away. This will allow to > handle all future facilities transparently from a kernel POV. I find your use of the term 'subfunction' confusing here. In the kvm_s390_cpu_feat_init(void) function, it looks like the kvm_s390_available_subfunc structure is filled in with bits returned from CPACF queries of various MSA facilities to indicate which CPACF functions are supported. APXA is not a subfunction but a facility that is indicated by a bit returned from the PQAP(QCI) instruction. If we are to implement this, wouldn't it be done as a CPU model feature as opposed to a subfunction? Am I misunderstanding what you are asking for? > > Implementing that should be easy - and I don't like gluing features > together in such a way. > > You can always assure that consistent data (e.g. AP + APXA availability) > is reported from KVM to QEMU. > >> Regards, >> Pierre >> >> >> >> >