From patchwork Thu Oct 26 15:54:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Krowiak X-Patchwork-Id: 10028589 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A4BF26022E for ; Thu, 26 Oct 2017 15:55:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B201228DE7 for ; Thu, 26 Oct 2017 15:55:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A685828E54; Thu, 26 Oct 2017 15:55:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DF1728DE7 for ; Thu, 26 Oct 2017 15:55:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932517AbdJZPzT (ORCPT ); Thu, 26 Oct 2017 11:55:19 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41280 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932456AbdJZPzO (ORCPT ); Thu, 26 Oct 2017 11:55:14 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9QFqUle134482 for ; Thu, 26 Oct 2017 11:55:14 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dufhm3dwq-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 26 Oct 2017 11:55:14 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Oct 2017 11:55:12 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 26 Oct 2017 11:55:09 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9QFt8we38338814; Thu, 26 Oct 2017 15:55:08 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4328DB204E; Thu, 26 Oct 2017 11:52:22 -0400 (EDT) Received: from localhost.localdomain (unknown [9.60.75.228]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTPS id B0B34B2046; Thu, 26 Oct 2017 11:52:21 -0400 (EDT) From: Tony Krowiak To: linux-s390@vger.kernel.org, qemu-s390x@nongnu.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, Tony Krowiak Subject: [RFC 4/5] s390x/cpumodel: enable AP facilities for guest Date: Thu, 26 Oct 2017 11:54:53 -0400 X-Mailer: git-send-email 1.7.1 In-Reply-To: <1509033294-4945-1-git-send-email-akrowiak@linux.vnet.ibm.com> References: <1509033294-4945-1-git-send-email-akrowiak@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17102615-0048-0000-0000-000001FBB7F8 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007955; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00936790; UDB=6.00472099; IPR=6.00717052; BA=6.00005660; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017727; XFM=3.00000015; UTC=2017-10-26 15:55:11 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17102615-0049-0000-0000-000042FD63F4 Message-Id: <1509033294-4945-5-git-send-email-akrowiak@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-26_05:, , 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-1707230000 definitions=main-1710260209 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sets up the following STFLE bits to enable the specified AP facilities for the guest VM: * STFLE.12: Enables the AP Query Configuration Information facility. The AP bus running in the guest uses the information returned from this instruction to configure AP adapters and domains for the guest machine. * STFLE.15: Enables the AP Special Command facility. The AP bus running in the guest sets the T bit in register 0 for the PQAP(TAPQ) instruction when scanning for AP devices if this facility is installed. These facilities are required in order for the AP bus running on the KVM guest to function properly. Signed-off-by: Tony Krowiak --- target/s390x/cpu_features.c | 2 ++ target/s390x/cpu_features_def.h | 2 ++ target/s390x/gen-features.c | 4 ++++ 3 files changed, 8 insertions(+), 0 deletions(-) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index 31a4676..63f002c 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -36,8 +36,10 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("srs", S390_FEAT_TYPE_STFL, 9, "Sense-running-status facility"), FEAT_INIT("csske", S390_FEAT_TYPE_STFL, 10, "Conditional-SSKE facility"), FEAT_INIT("ctop", S390_FEAT_TYPE_STFL, 11, "Configuration-topology facility"), + FEAT_INIT("apqci", S390_FEAT_TYPE_STFL, 12, "Query Adjunct Processor Configuration facility"), FEAT_INIT("ipter", S390_FEAT_TYPE_STFL, 13, "IPTE-range facility"), FEAT_INIT("nonqks", S390_FEAT_TYPE_STFL, 14, "Nonquiescing key-setting facility"), + FEAT_INIT("apsc", S390_FEAT_TYPE_STFL, 15, "Adjunct Processor Special Command facility"), FEAT_INIT("etf2", S390_FEAT_TYPE_STFL, 16, "Extended-translation facility 2"), FEAT_INIT("msa-base", S390_FEAT_TYPE_STFL, 17, "Message-security-assist facility (excluding subfunctions)"), FEAT_INIT("ldisp", S390_FEAT_TYPE_STFL, 18, "Long-displacement facility"), diff --git a/target/s390x/cpu_features_def.h b/target/s390x/cpu_features_def.h index 4b6d4e9..4e2589f 100644 --- a/target/s390x/cpu_features_def.h +++ b/target/s390x/cpu_features_def.h @@ -27,8 +27,10 @@ typedef enum { S390_FEAT_SENSE_RUNNING_STATUS, S390_FEAT_CONDITIONAL_SSKE, S390_FEAT_CONFIGURATION_TOPOLOGY, + S390_FEAT_AP_QUERY_CONFIG_INFO, S390_FEAT_IPTE_RANGE, S390_FEAT_NONQ_KEY_SETTING, + S390_FEAT_AP_SPECIAL_CMD, S390_FEAT_EXTENDED_TRANSLATION_2, S390_FEAT_MSA, S390_FEAT_LONG_DISPLACEMENT, diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index 68e6c31..42914cf 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -425,6 +425,10 @@ static uint16_t full_GEN11_GA1[] = { S390_FEAT_IPTE_RANGE, S390_FEAT_ACCESS_EXCEPTION_FS_INDICATION, S390_FEAT_GROUP_MSA_EXT_4, + S390_FEAT_AP_QUERY_CONFIG_INFO, + S390_FEAT_AP_SPECIAL_CMD, + /* FIXME when GISA support is available + S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL,*/ }; #define full_GEN11_GA2 EmptyFeat