Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3535827pxb; Mon, 4 Apr 2022 20:19:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6PLeLj46HGkFZU4D88o+5o3wBAjd+zj/cpUlstlbqlXicJCbf+fWw+AGYdEwvLcXcwR8b X-Received: by 2002:a05:6a00:1c9e:b0:4fa:d946:378b with SMTP id y30-20020a056a001c9e00b004fad946378bmr1325464pfw.46.1649128765685; Mon, 04 Apr 2022 20:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649128765; cv=none; d=google.com; s=arc-20160816; b=y/sTFB/oWA7eXUU1GPY6LDUvX2/vUqT8XGOZUGFsfb37N/apC8D3D0hpHRc6egwmiK ofaxmrTyJq9P3+KtgmWREGfIOQ9ERe6GXaJB2hOsJEYeEREJjNOqOYSBi3gbEO0SPe1P gMk1khNXNwXaCtl2C1UvDRj6SXA+MQbgQk/Qdj7u7VVJEkyYW/rBTE4OmAa7iOjKTrcS 2189KQ28wWjAGbVr2w868vY+FO8tnLhsmGL/zjykh0OIowiwmgx6EpA/zBa9fdAKmFun T+5PxBuLdSUY91WYtPO7iNwDIsRfbmrlZYsK8IN5IYItk7JJgiA3JILed3F7j1RoK/KZ r8Uw== 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=Fs5EyWX+JoTVnhzrVnav59IWH8e5IXoIFjnGKl5zWAHxcJXjjRy1+P460gdf4PBsuw /A4WiuZwTbW4Hv6Ao5y0PEGrScEN5m+rb7QVgV8QOpqG6NQ07NLccFaqV+PZ0H5k0zit mw+qwgamKiV1+UXcG2SqgmrS0xOXxdna8ddF4//IgImvEdU9/vjSWk1yV12JK6uMgZtk NoIy7jSZ4fYFIc2P/HPD3HMXcsXeJe+4x3wP4u336f5wLHR1XmUvoaHdVSxKQjr5QnB6 hI0Mpy+oQ3rggZSmCfhZScXSsys+Sx7bhyLytO7ViL2WnPtcwBPJXeNUy/aTV4qESFNH Zr0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=q+olUMdN; 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 j7-20020aa78dc7000000b004fa80fdf3fbsi11379275pfr.217.2022.04.04.20.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 20:19:25 -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=q+olUMdN; 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 01B791D41A1; Mon, 4 Apr 2022 18:19:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387055AbiDDVmu (ORCPT + 99 others); Mon, 4 Apr 2022 17:42:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379655AbiDDRqT (ORCPT ); Mon, 4 Apr 2022 13:46:19 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88A4F13EBA; Mon, 4 Apr 2022 10:44:21 -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 234Gkf6S002987; Mon, 4 Apr 2022 17:44:21 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=q+olUMdNYKnvTOBOjFhLiSBegoZqV5kuITGLQ8tn8YeroPN/E5PDvB9yjGIDhRtqe1V+ A4AO40DtKJGTiliYpOQ6TsEO3DATpY1uABheOhmvsGmWWZlkbdRebGS2e2yshWcLewh5 gvbfJu/RpuCVTMkTYkG9EQ45bizGiq845ch4xUnXi8iRInVBeOcGoSNrklkCHEkcKXM1 dyAncUgTvTRYcJCVoNw43J7O0f06rMqJHQZl5JMK9vFi4xYUEhl1dGSX0jBv94ZmsIDC IkLnfxAwuoHPQn8SYBARQbI8wUf9HfkjgiXueF3wVkzJct0524osU6JuyaFWFhLGgwNQ yw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f84gb20tj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Apr 2022 17:44:20 +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 234HeqV5013208; Mon, 4 Apr 2022 17:44:20 GMT Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f84gb20st-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Apr 2022 17:44:20 +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 234HgwXN006537; Mon, 4 Apr 2022 17:44:19 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 3f6tyrw9rx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Apr 2022 17:44:19 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 234HiHIF31850816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Apr 2022 17:44:17 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB247136053; Mon, 4 Apr 2022 17:44:17 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E20E7136051; Mon, 4 Apr 2022 17:44:15 +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: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, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v5 09/21] s390/pci: stash dtsm and maxstbl Date: Mon, 4 Apr 2022 13:43:37 -0400 Message-Id: <20220404174349.58530-10-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: 8KooJeySn9L6JHj9uLDeACZ71K5x8Y8P X-Proofpoint-GUID: pHWp-3GXDTD0yhm5Dtw7k-ZSwDabkNgo 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=999 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 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