Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3782483ioo; Wed, 25 May 2022 08:04:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1Grj2q/Ege6dr6fO61KWwzvb0U85YzOev8TAlY1zULr5CMF+bs231EqRiTLx7U3iHyRAF X-Received: by 2002:a17:906:4ccc:b0:6fe:9155:47ae with SMTP id q12-20020a1709064ccc00b006fe915547aemr28527084ejt.246.1653491048415; Wed, 25 May 2022 08:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653491048; cv=none; d=google.com; s=arc-20160816; b=u42GXmR6wp/PTWVfPJoPhNo/V2J2KLUr0Jj2f/j+hyAw0TuE62HUbMxmxGzHnpuSrd Eqi7I+t+zopAnE3IEllV55+2YyZLlXJyGopQ4ORAnKinZk5OMIrsClKdGnkcDTruLSqK 7FBtvt5jh11o9NNRM1QUeOzkxw4/YP6OyMfOYnIHooUzpef3eYzYWq9+dZE89c3IiFIS daAp3LG/ufGXUwb4qgGa3LjlZudXDNesTMCbvgYvN0u1f7XTbdzh1wTUk1ZkE+Yodcob PVA6SuVm/SicAx3YmEY42Ot9kxfAAfR8MN9K7Jmq0JQxPPWZ3NPGQp/VC9k7OmotHc36 9A3w== 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=5Slx5FLdPNpExytNsZYr6fPsZUMWp2bLsUYnydB9xKg=; b=yvzDZACvXdRVN/BX2G/QCm3JF1Z1LwhpkmzTQmrILK6zbqCjZdT4zWyN6qwv0k/mJT qAtWezliNq6/XdOf3mQ3AVbRGfd5tx1wmovZCKXjtckfRhQ9SiSyyiocaiwr4AAGQ+GK 0SLVRBl2yzJaRaCInLUlU+dVpU4ChD5sP5QvT8T+G3lsoSZV2/O3qs84yLlggBWk4R1D G6KrUxJBx0wHrCcG7j+y2XvPkJYgXONf+awQK3QySI5JTx424OO0TKS12zHG5Q0SYIbR Ht+bvErLqaUdyDADGBTvBWaE485jbi9uYW81G2UT1XgGKBhinBAPPB9SUvRWE10D5+FH Taeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=KUzISkox; 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 o10-20020a056402038a00b0042ab6912e88si19681077edv.228.2022.05.25.08.03.40; Wed, 25 May 2022 08:04:08 -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=KUzISkox; 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 S240751AbiEXTCY (ORCPT + 99 others); Tue, 24 May 2022 15:02:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240972AbiEXTBP (ORCPT ); Tue, 24 May 2022 15:01:15 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 816158BD18; Tue, 24 May 2022 12:00:38 -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 24OIIWWB028627; Tue, 24 May 2022 19:00:05 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=5Slx5FLdPNpExytNsZYr6fPsZUMWp2bLsUYnydB9xKg=; b=KUzISkoxgezcDirfa5DHQ34zrLQbj/WA9t9Kl7gWSfAMzTHf6JJAcVSwCLShm41Dh48t Ls2N7glOkNF/OlJKw7/ho3HuDU9DsnHWHgcPkMYMgZAZSR9/Z+19Zoxt91bPkD4yEA0E TCoCEW4WXF4q0mm2ChJ0ras2Oo2fSWRGeHRE39peuitFXeOLSu4w+VKYmNSBtJu35/x5 4iwG2j5hZRvpq/ewheF9sWIyAgoWfooRQ5Rdg81Dtbb3iMOWysmMtf2wCO26+g1lj0n3 1iCxBflpadkNZOWFJI50tOka6p0N76XYRj4vgBi9V7sRCXjZCYWBahW7UuYo+YW6hpcB 6g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g94hd0ps4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 19:00:05 +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 24OIi6mi001117; Tue, 24 May 2022 19:00:05 GMT Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g94hd0prd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 19:00:04 +0000 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24OIs6eH021750; Tue, 24 May 2022 19:00:03 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma01wdc.us.ibm.com with ESMTP id 3g93uu8hcy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 19:00:03 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24OJ02Wm29360534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 May 2022 19:00:02 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 71C10BE05A; Tue, 24 May 2022 19:00:02 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4694DBE056; Tue, 24 May 2022 19:00:00 +0000 (GMT) Received: from li-c92d2ccc-254b-11b2-a85c-a700b5bfb098.ibm.com.com (unknown [9.163.3.233]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 24 May 2022 19:00:00 +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 v8 21/22] KVM: s390: introduce CPU feature for zPCI Interpretation Date: Tue, 24 May 2022 14:59:06 -0400 Message-Id: <20220524185907.140285-22-mjrosato@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220524185907.140285-1-mjrosato@linux.ibm.com> References: <20220524185907.140285-1-mjrosato@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: -hbfx28MxMgcA8gbg0hzUpt7gu72IonE X-Proofpoint-GUID: G6Pnv6nd3GWaMpfEzQrdzqYhbiDTalwv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-24_09,2022-05-23_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 malwarescore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=863 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205240090 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 af96b613d7e7..9da833a330f8 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