Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3440255pxb; Mon, 4 Apr 2022 17:05:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcFpL/nvhJICjgdMznpUNTorv6GhUWOmvsoJNCg3ZC1iuFLw4GuVzmVJ1CC60FXLLDhj39 X-Received: by 2002:a05:6a00:2304:b0:4fa:dff2:88f5 with SMTP id h4-20020a056a00230400b004fadff288f5mr759696pfh.11.1649117110491; Mon, 04 Apr 2022 17:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649117110; cv=none; d=google.com; s=arc-20160816; b=t4CVMCcy2K1TAZkrb/ix5qLQQtBPImmvCCKRBrdk4QPggpBqj8UXAcHzRHLwVxKvey j+mZX5Aq3CiPyInTD670KuCStqAODtWcHer0OBpW7mIoE1YV7wSfjsli953UkKsKjCwB PzYgP6YnO1BDinafClUPjK+vOKlUw62c9dYf7lStSvXfegv0voAj06IRiIJ96l7SR0IF cMeRNka7D1R7SFn/rpJDjiqxaCf0gmjVYYAXR1tAi7RvL5rJMZaVDoQj0mkLPzqK6l1Q ytOWUo+bAoJ8FCOTg8SmEKtf+vSGgtZmJu+B5pu9NadhAL34Xhh7u3Qz1/YeaTPgtjev SEpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=55395kSk15zitzJ5LcuDC0N7zxhE9CzjBWq/MUeaqqk=; b=IrYUVFyt4dkVUfToY3oX2c0s6OlxB6wN5h4CKVHSU60sdjS0qGxaaVWqgEOyjVXOdx aaCyoRKyqstOm39yxSlIvCrrQB8L2J2nETUZcepo7vUlVuSe7Rs3VMU5c8aFjpJnjdC6 Dm5xYPg2gHvj7K8E4lSV1DHze5r/y3pdvl0BIVuEFO9bxRQ7lCZAjADPHBAhRODpzb5e IV1OgXuruiKVkdl6MtMCGGs2yAPkwzkIbWdhyShCyoi/nJW93tJOjcJ4HJec6slrumGT oIap+H3ULyjzf4Nfc57FuQrYHBHm2Tt7gbGhFJ3+uX8wmAbfDWjmrdcMWVcg0KgSOlP1 stsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=o+MNYX8J; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b13-20020a631b0d000000b003816043f0b8si11232826pgb.685.2022.04.04.17.05.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 17:05:10 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=o+MNYX8J; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EE99350449; Mon, 4 Apr 2022 16:40:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357556AbiDDV5N (ORCPT + 99 others); Mon, 4 Apr 2022 17:57:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379670AbiDDRqm (ORCPT ); Mon, 4 Apr 2022 13:46:42 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB71913EBA; Mon, 4 Apr 2022 10:44:45 -0700 (PDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 234GkhXM003136; Mon, 4 Apr 2022 17:44:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=55395kSk15zitzJ5LcuDC0N7zxhE9CzjBWq/MUeaqqk=; b=o+MNYX8J7dqn8EE6J04VoaUZI7TNEdgQixTycDE6seUzZkin8D3YqRdgcWTL5v/uVBT3 KLorukzvqD6bXPHaFWIabL+aIHa7zZJm4xb+4a2XecBFhPRMS6baDD6knPux8CYagmUT mnbP7JpOUF6w1+2ErVelcSB8aE8wFAFtVnP/0deKd6qHA9VZCSJvdtoAINhCzGTg8/r9 NhhsZLAHvWYiRpV6acansTavaRTd2/TP0ztOdQXRDeJNTRGhyCBRtnOe6/7Q2MRMQ0Nl az+oAR6sVlo0f6hjZO2GLsiYlli+vSK4kHOa/Vc18Yogsw3X2CImqnGnbZ0zB1eA7L4c 8g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f84gb217w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Apr 2022 17:44:45 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 234HFo0e018129; Mon, 4 Apr 2022 17:44:45 GMT Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f84gb217b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Apr 2022 17:44:45 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 234Hgw8R004894; Mon, 4 Apr 2022 17:44:44 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma02dal.us.ibm.com with ESMTP id 3f6e4a5ffd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Apr 2022 17:44:44 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 234HighG31392184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Apr 2022 17:44:42 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 97809136060; Mon, 4 Apr 2022 17:44:42 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 72D03136061; Mon, 4 Apr 2022 17:44:40 +0000 (GMT) Received: from li-c92d2ccc-254b-11b2-a85c-a700b5bfb098.ibm.com.com (unknown [9.211.32.125]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 4 Apr 2022 17:44:40 +0000 (GMT) From: Matthew Rosato To: linux-s390@vger.kernel.org Cc: alex.williamson@redhat.com, cohuck@redhat.com, schnelle@linux.ibm.com, farman@linux.ibm.com, pmorel@linux.ibm.com, borntraeger@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, gerald.schaefer@linux.ibm.com, agordeev@linux.ibm.com, svens@linux.ibm.com, frankja@linux.ibm.com, david@redhat.com, imbrenda@linux.ibm.com, vneethv@linux.ibm.com, oberpar@linux.ibm.com, freude@linux.ibm.com, thuth@redhat.com, pasic@linux.ibm.com, pbonzini@redhat.com, corbet@lwn.net, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v5 20/21] KVM: s390: introduce CPU feature for zPCI Interpretation Date: Mon, 4 Apr 2022 13:43:48 -0400 Message-Id: <20220404174349.58530-21-mjrosato@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220404174349.58530-1-mjrosato@linux.ibm.com> References: <20220404174349.58530-1-mjrosato@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: X2Gk51FyrU7Srappp1brKxFsbjkMNtiB X-Proofpoint-GUID: d5YwXOkqOlQdadwOD96nKi_kF7sJOwDR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-04_06,2022-03-31_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 mlxlogscore=963 mlxscore=0 phishscore=0 malwarescore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204040099 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org KVM_S390_VM_CPU_FEAT_ZPCI_INTERP relays whether zPCI interpretive execution is possible based on the available hardware facilities. Signed-off-by: Matthew Rosato --- arch/s390/include/uapi/asm/kvm.h | 1 + arch/s390/kvm/kvm-s390.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/arch/s390/include/uapi/asm/kvm.h b/arch/s390/include/uapi/asm/kvm.h index 7a6b14874d65..ed06458a871f 100644 --- a/arch/s390/include/uapi/asm/kvm.h +++ b/arch/s390/include/uapi/asm/kvm.h @@ -130,6 +130,7 @@ struct kvm_s390_vm_cpu_machine { #define KVM_S390_VM_CPU_FEAT_PFMFI 11 #define KVM_S390_VM_CPU_FEAT_SIGPIF 12 #define KVM_S390_VM_CPU_FEAT_KSS 13 +#define KVM_S390_VM_CPU_FEAT_ZPCI_INTERP 14 struct kvm_s390_vm_cpu_feat { __u64 feat[16]; }; diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 65a53e22f686..d6988bd22df8 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -433,6 +433,10 @@ static void kvm_s390_cpu_feat_init(void) if (test_facility(151)) /* DFLTCC */ __insn32_query(INSN_DFLTCC, kvm_s390_available_subfunc.dfltcc); + /* zPCI Interpretation */ + if (kvm_s390_pci_interp_allowed()) + allow_cpu_feat(KVM_S390_VM_CPU_FEAT_ZPCI_INTERP); + if (MACHINE_HAS_ESOP) allow_cpu_feat(KVM_S390_VM_CPU_FEAT_ESOP); /* -- 2.27.0