Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4440082rwi; Mon, 17 Oct 2022 06:22:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5AnnvtL5vHKVj1Zo8x9HJ083mL60idTOvnw+MrxRwUrMQQ0GqeCFHl2zwf5DQiTxgSe15O X-Received: by 2002:a17:906:8a47:b0:78d:b6d8:f531 with SMTP id gx7-20020a1709068a4700b0078db6d8f531mr8709221ejc.287.1666012926652; Mon, 17 Oct 2022 06:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666012926; cv=none; d=google.com; s=arc-20160816; b=dx74DKb9D5av9rddRDChKIDg4Wl7NqhhZDdzb82v/2OuoTpzx+jK2OuTqOI/oBxq3f K162Hm0HmhqSWAEWqXgFlibl5S24wXabZVLFnL3GAEhfO2hsWv7RZ91QouYAQQsleZxQ oHY9PSxFJQC05FjRwqsIHk5qEBNjIWxubpUQ/HhARj2fBnT8Nt18dQKaD68hlkvlQihz v/mje3L6IUtQ/pmXWHAxhz65ZI5f012qsooKPW94Xpw1GDWhPRKOzhgyc24iQfcaZiGi jusyxFqO+wYarg0w8sMJT0qDoMJKkLLBBPwWP28WzHaEcncE+ryJv/FPrEAm5Qv2Ed5/ byZQ== 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=Sl3Pl+e312um5EfvhvLnKPcdCVoOuhPXamRqe7Sbe4c=; b=r62zRgd7EuQ8xnLahgievUR1mO2Dg49np2Py94mIo4V6fTJ0nL9P4HnImH01ip03Jt veYV5FellbpjD63dB/gBYOSKOhVYQtCBb3Uk3FCshh17tXHzIwjGtUESW/hAStWREfs+ yDlNZtTV8mEq6XWVE8eXuqB6p8Nwr/U6tWnfK8vurlVsgMH8Jmmo4E7igg2gqr+KdhPi Mn6B5vC6cY64oMsQiKODh1Cowt/5OAiqJvk1ZA5UM5RDtqUcYrM8xJplhPqqGvm/yTMA jhEkUB94r9PdxWAhZscjUHTO/NvOcMjcJqwxjR56Xk2gIiJQli+9wrCEAx4IZUeiAYan p6GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=eMroURnr; 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 gb27-20020a170907961b00b00741a16e8562si9113582ejc.826.2022.10.17.06.21.40; Mon, 17 Oct 2022 06:22:06 -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=eMroURnr; 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 S230325AbiJQMqV (ORCPT + 99 others); Mon, 17 Oct 2022 08:46:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbiJQMqT (ORCPT ); Mon, 17 Oct 2022 08: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 A175254C96; Mon, 17 Oct 2022 05:46:18 -0700 (PDT) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29HBUJKp036486; Mon, 17 Oct 2022 12:46:08 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=Sl3Pl+e312um5EfvhvLnKPcdCVoOuhPXamRqe7Sbe4c=; b=eMroURnrnioBJBl+VVYFtVlvsF2RrHa+yOjtBFN6Ys5nht+KUr39jQ/CeHTPlNFUrMoU Hdigb9WCE9Y9rWhrc7FocNo4cQeqXt8aeF9tGe7nBmRRKM2tbVSCJK8mdfQ+DVCQxQeY sRjActuX9BDyruXoNSxYYBql0nNMEH81SVhFmoxuwcXyglcOExNL4vggCCJ+yU1oX5/x KdV3slb7BMG5zSEYCRi0OAhPRRvNmrQId/MZn4BI/9oCCjJCPx6M+jqFp1uvD6hBhwbO 4b3JGVPzNIcuKDv15lRAaCxYJuXFBR5Yy45+3B/LhCaZBiA5Q09AZDR4jKnkOo2vbl7d aQ== Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k86ugh387-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Oct 2022 12:46:07 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29HCZvNl028001; Mon, 17 Oct 2022 12:46:05 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma02fra.de.ibm.com with ESMTP id 3k7mg92955-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Oct 2022 12:46:05 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29HCk2Oo4260544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Oct 2022 12:46:02 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0477211C04A; Mon, 17 Oct 2022 12:46:02 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 88CDA11C054; Mon, 17 Oct 2022 12:46:01 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 17 Oct 2022 12:46:01 +0000 (GMT) From: Niklas Schnelle To: iommu@lists.linux.dev, Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe Cc: Matthew Rosato , Gerd Bayer , Pierre Morel , 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, linux-kernel@vger.kernel.org Subject: [PATCH v7 5/6] iommu/s390: Fix incorrect pgsize_bitmap Date: Mon, 17 Oct 2022 14:45:57 +0200 Message-Id: <20221017124558.1386337-6-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221017124558.1386337-1-schnelle@linux.ibm.com> References: <20221017124558.1386337-1-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: CCr_7XbiZUX6I-PFXIDZEMzR69iQm8C7 X-Proofpoint-ORIG-GUID: CCr_7XbiZUX6I-PFXIDZEMzR69iQm8C7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-17_09,2022-10-17_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 phishscore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 spamscore=0 malwarescore=0 priorityscore=1501 adultscore=0 mlxscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210170072 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 fa8cb97bfc88..748e2e1b188a 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 { @@ -363,7 +356,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