From: Matthew Rosato <mjrosato@linux.ibm.com>
To: Niklas Schnelle <schnelle@linux.ibm.com>,
Pierre Morel <pmorel@linux.ibm.com>,
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: Re: [PATCH v4 5/5] iommu/s390: Fix incorrect pgsize_bitmap
Date: Tue, 4 Oct 2022 10:38:56 -0400 [thread overview]
Message-ID: <7216693d-c354-fa0d-8f26-e2bcf76fd854@linux.ibm.com> (raw)
In-Reply-To: <20221004120706.2957492-6-schnelle@linux.ibm.com>
On 10/4/22 8:07 AM, Niklas Schnelle wrote:
> 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: Jason Gunthorpe <jgg@nvidia.com>
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
> ---
> 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 94c444b909bd..6bf23e7830a2 100644
> --- a/drivers/iommu/s390-iommu.c
> +++ b/drivers/iommu/s390-iommu.c
> @@ -12,13 +12,6 @@
> #include <linux/sizes.h>
> #include <asm/pci_dma.h>
>
> -/*
> - * 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 {
> @@ -350,7 +343,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,
next prev parent reply other threads:[~2022-10-04 14:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 12:07 [PATCH v4 0/5] iommu/s390: Fixes related to attach and aperture handling Niklas Schnelle
2022-10-04 12:07 ` [PATCH v4 1/5] iommu/s390: Fix duplicate domain attachments Niklas Schnelle
2022-10-04 12:43 ` Jason Gunthorpe
2022-10-04 16:18 ` Matthew Rosato
2022-10-05 7:58 ` Niklas Schnelle
2022-10-05 11:48 ` Jason Gunthorpe
2022-10-06 11:52 ` Niklas Schnelle
2022-10-06 12:02 ` Jason Gunthorpe
2022-10-06 13:01 ` Niklas Schnelle
2022-10-04 12:07 ` [PATCH v4 2/5] iommu/s390: Get rid of s390_domain_device Niklas Schnelle
2022-10-04 16:20 ` Matthew Rosato
2022-10-04 12:07 ` [PATCH v4 3/5] iommu/s390: Fix potential s390_domain aperture shrinking Niklas Schnelle
2022-10-04 21:12 ` Matthew Rosato
2022-10-04 12:07 ` [PATCH v4 4/5] iommu/s390: Fix incorrect aperture check Niklas Schnelle
2022-10-04 12:07 ` [PATCH v4 5/5] iommu/s390: Fix incorrect pgsize_bitmap Niklas Schnelle
2022-10-04 14:38 ` Matthew Rosato [this message]
2022-10-04 15:02 ` Robin Murphy
2022-10-04 15:12 ` Matthew Rosato
2022-10-04 15:31 ` Robin Murphy
2022-10-04 16:13 ` Niklas Schnelle
2022-10-05 9:53 ` Robin Murphy
2022-10-05 11:03 ` Niklas Schnelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7216693d-c354-fa0d-8f26-e2bcf76fd854@linux.ibm.com \
--to=mjrosato@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pmorel@linux.ibm.com \
--cc=robin.murphy@arm.com \
--cc=schnelle@linux.ibm.com \
--cc=svens@linux.ibm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.