Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3040059pxb; Tue, 19 Jan 2021 12:06:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxS+fjUbwuCT3uQkuvEz0rCy20yzIwvgSld98QzqCpxHWfH8f0J0JFT3+dUaUCz6GFKlBTO X-Received: by 2002:a17:907:3e04:: with SMTP id hp4mr4256574ejc.188.1611086818926; Tue, 19 Jan 2021 12:06:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611086818; cv=none; d=google.com; s=arc-20160816; b=WazCKU9kuCJJSq7Xs4/y3JabUQQufcwLU8tlimGC3LhGjOlCXCtr7zH5Rq5TRlPdkW 8b8/xs5IPKyx4kAf6R27kGDG+KrbUaLY/B3EdAOd/WnHuud89g50KcCoZBUdjO5uiwKS 5aNcQy/Asz+QhsWWCW6iJh95exsPaR29VkNKQZvviLrLCKtdmJC7qT09JfWRODc149ep KiS43AE8XLjPAKLKkIeRhYBxD2uI4qnxR6Vv7+bdZK7ZScnHLUxG1GI/RPpyho21jG7v KHjC7pM8oBI5bgydV3novecquYYV788Z4xdfJasl5nenXY0G5fcLoHS8tRHcSaXOtivD HB3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=0u9A1QuSjmbJ/rAaQOhcdu29Aoy0Lx70TAbNYINn/vc=; b=gGJqjSXRsrG1J29YrIjy3+Rt4BVP3op+/2PQdsUvKETpTgoMcTod42B0B6VKV9Fu66 6QXgp9kWeLFg7TN49p05a3hEtmS3qbvnn3HKva5E1gOimPMOHZgz+wMr6eLd8Z4M1Kna TZBC1wq0DR/4i/sqaTOUC54CHThwfGHcwq0OsY/Z45x/yGxLIWvfrP5HebwTpsrUM/xM D2ti0otgo7xdNO/H8PfFut3zp+p2UsAyRHD2zCXnQqKkk50btVqyemTHj5Hh8bwtPMH2 yJdPJo/ijSqw41zEdSlHHAUalyDaI7tl079EUtRpeA25TGWsdWv8DrWAsCMb1aljB2eL RH8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=HxAEHm0+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gu1si8127639ejb.20.2021.01.19.12.06.34; Tue, 19 Jan 2021 12:06:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=HxAEHm0+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730009AbhASUEj (ORCPT + 99 others); Tue, 19 Jan 2021 15:04:39 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:18150 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730011AbhASUDZ (ORCPT ); Tue, 19 Jan 2021 15:03:25 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 10JJqFAR140713; Tue, 19 Jan 2021 15:02:45 -0500 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; s=pp1; bh=0u9A1QuSjmbJ/rAaQOhcdu29Aoy0Lx70TAbNYINn/vc=; b=HxAEHm0+pcIGLUcfmvqC1ocr8s9HeQ0oDrxj22soqEKJkx0V0jSSTCP3Fal3fCzToFpW CJPFDi46anjZG7hpH3ZNoRJz+6bXyiXXEyve3fm6gziV+ArH+FMx9lC+9TnlN8dCOgYg OXsFPM6QqZNn2BzNho74zr37158Zw/LwYxFwDA6JrrwWYliuNPZhp8brgRD/ZcdDBEZX 6sOpAku7UYHdBkkT11LRO1XXmpqgivYGF1E/kZlJIsmUjYwUEU5BogZC82+/MjL2PsJm XMUMkbouJU5J/z2xT1NqCnEJfnjwInytlt9G4CiTOEOi4SEI+JZRItgtbQXZ4KJ4ATCk fA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3665y307qw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Jan 2021 15:02:45 -0500 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 10JJsaCD147680; Tue, 19 Jan 2021 15:02:45 -0500 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 3665y307qd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Jan 2021 15:02:44 -0500 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10JJpV1K030023; Tue, 19 Jan 2021 20:02:43 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma03wdc.us.ibm.com with ESMTP id 363qs90pe8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Jan 2021 20:02:43 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 10JK2g5G30146978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Jan 2021 20:02:42 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 23C8DAC060; Tue, 19 Jan 2021 20:02:42 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 26AB3AC059; Tue, 19 Jan 2021 20:02:40 +0000 (GMT) Received: from oc4221205838.ibm.com (unknown [9.211.56.144]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 19 Jan 2021 20:02:39 +0000 (GMT) From: Matthew Rosato To: alex.williamson@redhat.com, cohuck@redhat.com, schnelle@linux.ibm.com Cc: pmorel@linux.ibm.com, borntraeger@de.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, gerald.schaefer@linux.ibm.com, linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] s390/pci: Get hardware-reported max store block length Date: Tue, 19 Jan 2021 15:02:29 -0500 Message-Id: <1611086550-32765-4-git-send-email-mjrosato@linux.ibm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1611086550-32765-1-git-send-email-mjrosato@linux.ibm.com> References: <1611086550-32765-1-git-send-email-mjrosato@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-19_09:2021-01-18,2021-01-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 mlxscore=0 adultscore=0 phishscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101190106 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We'll need to know this information for vfio passthrough. Signed-off-by: Matthew Rosato Reviewed-by: Pierre Morel --- arch/s390/include/asm/pci.h | 1 + arch/s390/include/asm/pci_clp.h | 3 ++- arch/s390/pci/pci_clp.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h index f16ffba..04f1f48 100644 --- a/arch/s390/include/asm/pci.h +++ b/arch/s390/include/asm/pci.h @@ -181,6 +181,7 @@ struct zpci_dev { atomic64_t mapped_pages; atomic64_t unmapped_pages; + u16 maxstbl; u8 version; enum pci_bus_speed max_bus_speed; diff --git a/arch/s390/include/asm/pci_clp.h b/arch/s390/include/asm/pci_clp.h index 9fb7cbf..ddd1604 100644 --- a/arch/s390/include/asm/pci_clp.h +++ b/arch/s390/include/asm/pci_clp.h @@ -155,7 +155,8 @@ struct clp_rsp_query_pci_grp { u8 : 1; u8 frame : 1; u8 refresh : 1; /* TLB refresh mode */ - u16 reserved2; + u16 : 3; + u16 maxstbl : 13; u16 mui; u16 : 16; u16 maxfaal; diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c index 630f8fc..99b64fe 100644 --- a/arch/s390/pci/pci_clp.c +++ b/arch/s390/pci/pci_clp.c @@ -104,6 +104,7 @@ static void clp_store_query_pci_fngrp(struct zpci_dev *zdev, zdev->fmb_update = response->mui; zdev->version = response->version; zdev->relaxed_align = response->relaxed_align; + zdev->maxstbl = response->maxstbl; switch (response->version) { case 1: -- 1.8.3.1