Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4002208ioa; Tue, 26 Apr 2022 14:33:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRNLG7nQd0hu71s8TnKIOgymQnJ7B0ice0KtdF4NmfjJnpCAjCMcFJxfKV/xjE761RtNkx X-Received: by 2002:a17:907:6289:b0:6e0:eb0c:8ee7 with SMTP id nd9-20020a170907628900b006e0eb0c8ee7mr21986324ejc.245.1651008808101; Tue, 26 Apr 2022 14:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651008808; cv=none; d=google.com; s=arc-20160816; b=cunh/8pAr5P2N6OSSBRw7fcclDyiyaK0/nJjk/fkkbSpZXAy0Z6KTxYcU8xsA7CKrO qW2v04w/LWPME4Im71eI0iNaFaZxzErWrtRD28PgMcwIzrGa2kkooa3B8kk+nhF1AGAP NNugerFEWllAXNXDsC0gVgyskaGDY8i9BzS4Ncgb2MOcYgpyoQznZINCah+WUY71Xbjr vusgJZC5c8eY7trrfgUlkmBXj6dH13AlItmgd3Ikc89F51XWNWcCJ99NJlN7R5zs3XU8 pHzLvdCadpFk8GfTDGFAUtPMFsGllXO4yn5mRyblAYj26XARcrEZ5wuqZx7LGaxr7pP6 PyKw== 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=UGBMSjGfC9dSyO6eMZUocM1nnHDrQ4/LX2/0T0AWPqg=; b=T/rnMAMKsfl1DKO6Tt/d/cgRxxPMmVkQLAQV6fB3XDAu9XjFHvWTGHftZUuRgni9Ue e5f525RNmqVAFlPllyCbWqtqCygyMqX41oTgLUOIw9vV4usj70J8wNOFspyy0/8FO4Eu ONPp1yQgzx3/TDm3K2HmKhyqOKvpzZJ4NRANPYTecmXI9+Kf6yWCgxU+XxEFoqX8Aql8 lkJNeQtsltwmY0oazmgINpRmDTzq23Sp1nSI1hr869wpUXgLqH9uiXNvDjm38C4gSN9Z 3deBOrLxrgB9l4hHbGVQQu44f5YcUHBDIp3WYu0tMHeLrF8vy9jxl9klYHAQKkCCkJ4Y T/WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=m+xq39Im; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a056402254700b00425e55041e4si6896022edb.228.2022.04.26.14.33.04; Tue, 26 Apr 2022 14:33:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=m+xq39Im; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354687AbiDZUP7 (ORCPT + 99 others); Tue, 26 Apr 2022 16:15:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354629AbiDZUNs (ORCPT ); Tue, 26 Apr 2022 16:13:48 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50EB2E0C0; Tue, 26 Apr 2022 13:10:24 -0700 (PDT) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23QK4BXn030844; Tue, 26 Apr 2022 20:10:22 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=UGBMSjGfC9dSyO6eMZUocM1nnHDrQ4/LX2/0T0AWPqg=; b=m+xq39ImMnyMgA5gs3dM5OsWiiawweESY8QzTmZoCvxUfnXoY6gt2Y3sDhBoZdZBRKAy 8dQmT2wmm+gph8BDkLxfa1ZecJMBjgxcZHjEnzo+aGt8coZe7EqipOmyynrjXVXqA6rP fyBtV6drmbHCmo2P9pQ2eyFVauJFra3Znagt5hHDB46sA54vxoFsIgLFVjIIIOw3Lrn5 iqDXCHONAAECVlqByP8sjrTlK7J5Jqk0fs+pgOTM0EQdLAWOQae78JcVr1IKyxYkMaYs V+J3QhkNHtIPQ6IVrpkfsH5ow3tKZyZbt9mw14mfZeAVLg5aPOFq/KhKJT0wliEupPn/ 5w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3fpp0s9qg6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Apr 2022 20:10:21 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 23QK5J7Q004964; Tue, 26 Apr 2022 20:10:21 GMT Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3fpp0s9qfn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Apr 2022 20:10:21 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23QK6lsM020085; Tue, 26 Apr 2022 20:10:19 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma05wdc.us.ibm.com with ESMTP id 3fm939fga5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Apr 2022 20:10:19 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23QKAJlQ13304268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Apr 2022 20:10:19 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 291FAB2068; Tue, 26 Apr 2022 20:10:19 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 869A9B206A; Tue, 26 Apr 2022 20:10:15 +0000 (GMT) Received: from li-c92d2ccc-254b-11b2-a85c-a700b5bfb098.ibm.com.com (unknown [9.211.73.42]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 26 Apr 2022 20:10:15 +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, jgg@nvidia.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v6 20/21] KVM: s390: introduce CPU feature for zPCI Interpretation Date: Tue, 26 Apr 2022 16:08:41 -0400 Message-Id: <20220426200842.98655-21-mjrosato@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220426200842.98655-1-mjrosato@linux.ibm.com> References: <20220426200842.98655-1-mjrosato@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: QWFUvnPDKFMNpN0PRB7cV8KyUB2QNqlr X-Proofpoint-ORIG-GUID: UFVyjYM_CZ50xG55b5Cpb5Pj1Fw5Gy7n X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-26_06,2022-04-26_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 mlxlogscore=904 priorityscore=1501 lowpriorityscore=0 malwarescore=0 phishscore=0 spamscore=0 adultscore=0 impostorscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204260127 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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. Reviewed-by: Pierre Morel 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 69e435b06425..32b1c5d3d46b 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