Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp734201rwb; Fri, 7 Oct 2022 03:32:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5lue2xDKL5OPlqSaBPFXrWx4Pk9vV6mfGZg0PZSLxDbvAieglRm3cy+ZQ8hdj8ROSAPh+s X-Received: by 2002:a17:907:a069:b0:78d:5617:f94b with SMTP id ia9-20020a170907a06900b0078d5617f94bmr2166187ejc.558.1665138756791; Fri, 07 Oct 2022 03:32:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665138756; cv=none; d=google.com; s=arc-20160816; b=lJxRgY6xCHufmC9SGY4RBECz2l6cK5lJyWzuRSeaEEB9cJfdJupGvtMcp0df+tbMFr m7b9DhbcL6rXTjvZMdhkwty7+F1O7RhO1laIFbBskbkekH3WtzWR/BDPhclYyDAkV8ab E3s+nesLvvUQMoBwMFT1lq5py3spwBIs4Q1Za6awr9tj9ZptFX+3KhGha7mYz7dcPtc0 gYd9Sh+/WBLQ2m3np/yji5Ty/7V3jcsBAdLcxzeGSallwaAEYM4yqNQCMFgr/XyFfUea IB4S2WoVgAxaPStsgJiqfNZWIJcOBdm+gXSD9Rq0aTIwEth/h0WGAX2Wg5EMBxvxW1Al rThA== 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=90xBI4t5xFLU8Bn8ZUxT40mDfH6QxRmqURoTJJEAiuM=; b=kGiVBuuhOxk0ciD/i9MwswCeh63ORtVV/XNe0B2kyVde8MniRnec/wKf5cY9A/x048 6Op+wBERUoaRINqCh3Xun19aEkKd7pKENKi/zNcjy7OwHZ4JSj2P67OO02pQeoSy7ZSe XM8x0A0QZL8wPY+BkpXIWhQI97nN/CYIs0XcJmlOIlkl+c6Z2/W55QNsgS1W8UydsxUd m6v2Iv43LwJKLvCv0DslLWT+fyzZbr0yhIImHkjYRkjH6DCOY68bepwXl3+IBflFya9N gmg01L0cgKRJrW5Lv7LMVXVzCA5lRIkBGzQH7V4g8pXok/PllJzq+qru8sYAhrxvnbko sJFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=owU5v+TL; 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 gs13-20020a1709072d0d00b00783c42d2da2si2251441ejc.415.2022.10.07.03.32.09; Fri, 07 Oct 2022 03:32:36 -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=owU5v+TL; 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 S229666AbiJGJuo (ORCPT + 99 others); Fri, 7 Oct 2022 05:50:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbiJGJu3 (ORCPT ); Fri, 7 Oct 2022 05:50:29 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CD259DF9E; Fri, 7 Oct 2022 02:50:24 -0700 (PDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2978W9aj019016; Fri, 7 Oct 2022 09:50: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=90xBI4t5xFLU8Bn8ZUxT40mDfH6QxRmqURoTJJEAiuM=; b=owU5v+TLgaAgRu36VA1p76MERDO1TtjeCAL2aQH2b13OEwPgj3itTKizVPEyXXh0g6sq YY1iCGlNeOp2lMik2zBI5AP8Glue3V2p1vEMzXC/h2vmHVT4X5YbzdSOrf5TagHRxeCD yjLOe37kGyBEAhYqHmKTkxqCwKjvaEEJ0OzQPW9PoP4dfOLQOAMubZReeStDqNcTJq5L Wjl6hbFpm9ifpd/6BLUUV9y16vjy3yOFUlaTQmQpAF3r+zx7UgiG1wxmXlib4opczEkh au/JB6/PFmVaNj0CAnSNlz7a6BPXNTt6Z2DPk1tu9MSxnQQYnSgcC6U0ALGyQ+4sA1uB wA== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3k2gphjbq4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Oct 2022 09:50:13 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2979aPQW004228; Fri, 7 Oct 2022 09:50:12 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03ams.nl.ibm.com with ESMTP id 3jxd698dyk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Oct 2022 09:50:11 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2979o8f11114756 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 7 Oct 2022 09:50:08 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D959DA4053; Fri, 7 Oct 2022 09:50:08 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6B179A404D; Fri, 7 Oct 2022 09:50:08 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 7 Oct 2022 09:50:08 +0000 (GMT) From: Niklas Schnelle To: Matthew Rosato , Pierre Morel , iommu@lists.linux.dev Cc: linux-s390@vger.kernel.org, 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, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, jgg@nvidia.com, linux-kernel@vger.kernel.org Subject: [PATCH v6 5/6] iommu/s390: Fix incorrect pgsize_bitmap Date: Fri, 7 Oct 2022 11:50:04 +0200 Message-Id: <20221007095005.2017126-6-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221007095005.2017126-1-schnelle@linux.ibm.com> References: <20221007095005.2017126-1-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: atYLBN8AcIWGtL_Q3HK4I3UcQj3Skjpw X-Proofpoint-ORIG-GUID: atYLBN8AcIWGtL_Q3HK4I3UcQj3Skjpw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-06_05,2022-10-06_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 suspectscore=0 phishscore=0 mlxscore=0 adultscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210070058 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 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 The .pgsize_bitmap property of struct iommu_ops is not a page mask but rather has a bit set for each size of pages the IOMMU supports. As the comment correctly pointed out at this moment the code only support 4K pages so simply use SZ_4K here. Reviewed-by: Matthew Rosato Reviewed-by: Jason Gunthorpe Signed-off-by: Niklas Schnelle --- drivers/iommu/s390-iommu.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c index a4c6a1a63fef..1524f18f8523 100644 --- a/drivers/iommu/s390-iommu.c +++ b/drivers/iommu/s390-iommu.c @@ -12,13 +12,6 @@ #include #include -/* - * Physically contiguous memory regions can be mapped with 4 KiB alignment, - * we allow all page sizes that are an order of 4KiB (no special large page - * support so far). - */ -#define S390_IOMMU_PGSIZES (~0xFFFUL) - static const struct iommu_ops s390_iommu_ops; struct s390_domain { @@ -358,7 +351,7 @@ static const struct iommu_ops s390_iommu_ops = { .probe_device = s390_iommu_probe_device, .release_device = s390_iommu_release_device, .device_group = generic_device_group, - .pgsize_bitmap = S390_IOMMU_PGSIZES, + .pgsize_bitmap = SZ_4K, .get_resv_regions = s390_iommu_get_resv_regions, .default_domain_ops = &(const struct iommu_domain_ops) { .attach_dev = s390_iommu_attach_device, -- 2.34.1