Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1037023iob; Fri, 13 May 2022 20:34:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+ZLvJ81VwMkZxxZIljZo0/BUKG3zYUeH1xkM0xoIvIat4t9/EvKDPY2th439JrNJFWppQ X-Received: by 2002:a5d:5847:0:b0:20c:525b:49d0 with SMTP id i7-20020a5d5847000000b0020c525b49d0mr6179630wrf.13.1652499254316; Fri, 13 May 2022 20:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652499254; cv=none; d=google.com; s=arc-20160816; b=NN9/jKzWGWsyLWyR7nJGlcGwTtUmUNSyO5aDbpDIHYVwfL24+eAvVvFG6nmkqV9IAX LQACfjXsI1D72hIF/b0kclgxJrqO9GnxKTRs0vjbcR2D6t6LTSnPD2uLzw6YRLHprG4k ikAEgvWdUPEmr5grC4VtPADvrz9OrR1Lh0zrOd9spx9eOQ71bO1fZzB6nfhWYJV7x3rU BQK9/AZ1I7v37ogQJTd7ViC9BTbGJt5Ra5Bwdrc3t8UCBSt2BxJpEzPfpa9GdU9e7O7+ oDBuPIvAacQhWuHFjT4D/CttU3va/uXv6EpY8Sn+GjNn5vcXlw40YGGZFrgZ2PK0RsLi kVIw== 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=UFI7L76a1PEOcLmRvvwmgXVaaf3fK28syFZ7EmcFI5o=; b=VS7sDFNQYD8d8TBnqf/smXcStNY3m6LtnGJayBl53UDgR1OabRY4XyTpkWJGIB4Jx2 WG2dI1WBYqxzZVIce49SOuHDy7eZIOUPaZNitcg75g3xhgUiDYYx4Mir/JtlJ+9ZAJ2V DmuZ6oI2exGJk5WbpaYKpzK6FM/BMYXrWhY10f0+pFo+x0TpvsKNbuWOJ4BZcS3okwXg boPvyNXuVnww9o+OrKQfYWJP4tINReNajjtS4p/A3McnGi7jAmnDs/29qJ+d/6ioFRuA Jg09Vy1aZHfg7ceRCvsdgFGTdAaiD5L3khmjgU7jtWGleoVYMRKz+DPbhA49pEWQz9gR SY1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=q4hu8TcY; 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 u16-20020a05600c441000b0039431b41e98si6749290wmn.189.2022.05.13.20.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 20:34:14 -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=q4hu8TcY; 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 8E2272F6078; Fri, 13 May 2022 17:10:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383811AbiEMTSq (ORCPT + 99 others); Fri, 13 May 2022 15:18:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383821AbiEMTST (ORCPT ); Fri, 13 May 2022 15:18:19 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C949C3DA66; Fri, 13 May 2022 12:17:16 -0700 (PDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24DIfp8l028098; Fri, 13 May 2022 19:17:14 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=UFI7L76a1PEOcLmRvvwmgXVaaf3fK28syFZ7EmcFI5o=; b=q4hu8TcYOce7OgWpmKMhzKYDm5SivR7FrupoMQ3ugwg6+VZnbXKb/c2+YfPZKJEvCtkp rQordRQw8iOKkK/wSdhFPlTIaBt+oETT3CzC5BMkoupyNJz6XJPMz45gY8IeAFoYKGIc PPmDAbAM5sgL4WwI5f3RPLbSjihi6p1/bEzLJNrHL3rUAcGA8eWWqg4/vC8UmJoLCL+4 GgPVuLUlah255XcTmXZ81jNZ1Y5bncT0dBD6kSbZsxsrhY6SDHORUh3PMqcvxcfisl7S sh0IyEt+Vn/DOePGVaP7U8ZHWVIlzGZDz/d16ckyLVZ1O1VbGridXm7zGpeeYLgBFK84 UA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g1vu5rkvc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 May 2022 19:17:13 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24DJHD6h017280; Fri, 13 May 2022 19:17:13 GMT Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g1vu5rkv7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 May 2022 19:17:13 +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 24DJCaqw005060; Fri, 13 May 2022 19:17:12 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma02dal.us.ibm.com with ESMTP id 3fwgdb7cdf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 May 2022 19:17:12 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24DJHBPw26345948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 May 2022 19:17:11 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 53437124053; Fri, 13 May 2022 19:17:11 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7F28C124052; Fri, 13 May 2022 19:17:06 +0000 (GMT) Received: from li-c92d2ccc-254b-11b2-a85c-a700b5bfb098.ibm.com.com (unknown [9.211.49.28]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 13 May 2022 19:17:06 +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 v7 21/22] KVM: s390: introduce CPU feature for zPCI Interpretation Date: Fri, 13 May 2022 15:15:08 -0400 Message-Id: <20220513191509.272897-22-mjrosato@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220513191509.272897-1-mjrosato@linux.ibm.com> References: <20220513191509.272897-1-mjrosato@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: EE2SjQzem2vII1xbEUgwRxgwwul3BY-4 X-Proofpoint-GUID: YFqrz2ZPfbdYnHAkNnmPcMlc75SmLn5a 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-05-13_11,2022-05-13_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 impostorscore=0 adultscore=0 malwarescore=0 mlxlogscore=866 phishscore=0 mlxscore=0 spamscore=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205130077 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. 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 1af7cea9d579..0fc2d8c5ccb1 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