Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3174503ioo; Tue, 24 May 2022 15:12:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwl18X4SVkurQELmF35nU/PeP91S7E+1d175DoL34FFMcm7+d07ITuIQCV8pIQdnHTa/erZ X-Received: by 2002:a17:902:74c6:b0:161:f5ba:c4eb with SMTP id f6-20020a17090274c600b00161f5bac4ebmr17227283plt.58.1653430371121; Tue, 24 May 2022 15:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653430371; cv=none; d=google.com; s=arc-20160816; b=VTJNroZO8Xra5JXtdlRtnqkv9ninA5SegW1TV4Jixj56H69xnMCIG6pAj8vCiebjm2 U8ytE08YjtzkXlOvqawQ2yFBFv/s8dB+TEsYIl8yCKZJ6gccsExPPUIxRI746BP3PhvV gZuY4NKX9eJoJSBeyIUdoXA/ecDOf8KFjSJnIy0g1pf3+8wRfrCv6jN8On0X6hRUg+fU 5gYSbij7VVbXbvvZWBsJ46z5rYnsMmk7G4uCD8sZRCvKFoHrwdlSx8FzFyCbqeLJeLXS +AZ7h3aFwdCc73LvLQV+BR0zssuI0ldhs/HV1rN+iyfVxb2Hv+LeVzXIBVXTTwTEN4+L XOPw== 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=M74r3Ua+EIq+K9RU4M+8Ajfg0WOUgyyO3dS1VNZKXEw=; b=u2vtdhB2F18NXDPuMyo103wsEXExGD7C+H2F1nM2mtuAzcIxa1XE4pv9oki8px0tcz TuF1OOQdicLLDVa/Dc50ZCGke7iHPIhAdck7YEzYu7lq+sofCbshZBenOkn6J9i09TMz pXPG30iXc/GU0cDyYbT++4jhO4sNVE1G+Bgq0bFzAtpOPPSmdPX/wwud99oY55DFcaWu IlqgonmJl0yQ7G9024gdyVbrHO7qp+crps31rhcZ8aM7td+0bOZNk+eL5NDyTbUm8sh2 unzHKd1Kx3pLdQoLbC/UpF1ZT5RwIr+yRClzMOIJfYMBJD3GH1YlwkwHjmRCdWcloKF/ CcbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=iLNaai+U; 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 h14-20020a056a00218e00b0051852e62488si19092111pfi.123.2022.05.24.15.12.38; Tue, 24 May 2022 15:12:51 -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=iLNaai+U; 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 S240637AbiEXTAJ (ORCPT + 99 others); Tue, 24 May 2022 15:00:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240623AbiEXS74 (ORCPT ); Tue, 24 May 2022 14:59:56 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 106ED68FBA; Tue, 24 May 2022 11:59:42 -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 24OHWB3R027096; Tue, 24 May 2022 18:59:38 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=M74r3Ua+EIq+K9RU4M+8Ajfg0WOUgyyO3dS1VNZKXEw=; b=iLNaai+UAQbfbouJ2VTVpWBULvYNu4x8L1kt0d7NCez1tSI96NzL4P96bEgz28VZeOPB STuD/Xm5/VBcAHSNY9LK22CZ0etS6ibKc67gV2OWa7w0pHYUmfg4KdDWrxFRadgXAVHe vIYh8gJzsephTkpP9q75X0QCfVbNTEUjp0OGC93ktfzV9icf1R2CUE4mFqhKQf2I2o8N GH4N+PaY6uwfTXuRimfe/W587gJOitvzo+YqIXY+V877iYAiHWI9/ym9E7aQePjSWr9l xFxcIpn/ErU4kVwggJ/vsJCQ5K7qSPwIJIOMInbuoeoIY9kAXvAxv+MI/0JWug4rXudJ 6g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g93un1n3m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 18:59:38 +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 24OIxbhn008168; Tue, 24 May 2022 18:59:37 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g93un1n3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 18:59:37 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24OIrx0Z011962; Tue, 24 May 2022 18:59:36 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma03dal.us.ibm.com with ESMTP id 3g93ut8nuq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 18:59:36 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24OIxZ1w13762834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 May 2022 18:59:35 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EE5BEBE051; Tue, 24 May 2022 18:59:34 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DD492BE05B; Tue, 24 May 2022 18:59:32 +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 18:59:32 +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 09/22] s390/pci: stash dtsm and maxstbl Date: Tue, 24 May 2022 14:58:54 -0400 Message-Id: <20220524185907.140285-10-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-GUID: Lrwy7KyWCLvIkdB98VwKHadpYjEckSCV X-Proofpoint-ORIG-GUID: e-IH6pygogzDdgmGIdGmBIurj_Zd1SjO 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 bulkscore=0 impostorscore=0 mlxlogscore=999 spamscore=0 phishscore=0 adultscore=0 malwarescore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 mlxscore=0 suspectscore=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 Store information about what IOAT designation types are supported by underlying hardware as well as the largest store block size allowed. These values will be needed by passthrough. Reviewed-by: Niklas Schnelle Reviewed-by: Pierre Morel Reviewed-by: Christian Borntraeger Signed-off-by: Matthew Rosato --- arch/s390/include/asm/pci.h | 2 ++ arch/s390/include/asm/pci_clp.h | 6 ++++-- arch/s390/pci/pci_clp.c | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h index 42a4a312a6dd..4c5b8fbc2079 100644 --- a/arch/s390/include/asm/pci.h +++ b/arch/s390/include/asm/pci.h @@ -126,9 +126,11 @@ struct zpci_dev { u32 gisa; /* GISA designation for passthrough */ u16 vfn; /* virtual function number */ u16 pchid; /* physical channel ID */ + u16 maxstbl; /* Maximum store block size */ u8 pfgid; /* function group ID */ u8 pft; /* pci function type */ u8 port; + u8 dtsm; /* Supported DT mask */ u8 rid_available : 1; u8 has_hp_slot : 1; u8 has_resources : 1; diff --git a/arch/s390/include/asm/pci_clp.h b/arch/s390/include/asm/pci_clp.h index f3286bc5ba6e..d6189ed14f84 100644 --- a/arch/s390/include/asm/pci_clp.h +++ b/arch/s390/include/asm/pci_clp.h @@ -153,9 +153,11 @@ struct clp_rsp_query_pci_grp { u8 : 6; u8 frame : 1; u8 refresh : 1; /* TLB refresh mode */ - u16 reserved2; + u16 : 3; + u16 maxstbl : 13; /* Maximum store block size */ u16 mui; - u16 : 16; + u8 dtsm; /* Supported DT mask */ + u8 reserved3; u16 maxfaal; u16 : 4; u16 dnoi : 12; diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c index deed35edea14..1edb07ceb766 100644 --- a/arch/s390/pci/pci_clp.c +++ b/arch/s390/pci/pci_clp.c @@ -106,6 +106,8 @@ static void clp_store_query_pci_fngrp(struct zpci_dev *zdev, zdev->max_msi = response->noi; zdev->fmb_update = response->mui; zdev->version = response->version; + zdev->maxstbl = response->maxstbl; + zdev->dtsm = response->dtsm; switch (response->version) { case 1: -- 2.27.0