From: Niklas Schnelle <schnelle@linux.ibm.com>
To: Matthew Rosato <mjrosato@linux.ibm.com>,
joro@8bytes.org, will@kernel.org, robin.murphy@arm.com,
gerald.schaefer@linux.ibm.com
Cc: hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com,
svens@linux.ibm.com, borntraeger@linux.ibm.com,
clegoate@redhat.com, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH v2 1/6] iommu/s390: add initial fields to track table size
Date: Wed, 05 Feb 2025 16:08:44 +0100 [thread overview]
Message-ID: <9519c98b6f681aac58201ffef389e2da86111272.camel@linux.ibm.com> (raw)
In-Reply-To: <20250124201826.348848-2-mjrosato@linux.ibm.com>
On Fri, 2025-01-24 at 15:18 -0500, Matthew Rosato wrote:
> In preparation for allowing for additional table levels, add the
> necessary information to the zdev and s390 domain to track table
> type. For now, these values will always be set to signify a
> region third table which is what s390-iommu always uses today.
>
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> ---
> arch/s390/include/asm/pci.h | 2 ++
> drivers/iommu/s390-iommu.c | 17 +++++++++++------
> 2 files changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h
> index 474e1f8d1d3c..8f8ebaeec60a 100644
> --- a/arch/s390/include/asm/pci.h
> +++ b/arch/s390/include/asm/pci.h
> @@ -189,6 +189,8 @@ struct zpci_dev {
> struct kvm_zdev *kzdev;
> struct mutex kzdev_lock;
> spinlock_t dom_lock; /* protect s390_domain change */
> + u64 max_table_size;
> + u8 origin_type;
I think ideally we would keep the origin_type in the struct s390_domain
only. For max_table_size I think we could just have an inline helper
returning the max table size given its origin_type, especially in
struct zpci_dev it feels wasteful to use 8 bytes in an already large
struct for something we can recalculate and that doesn't even change
often.
next prev parent reply other threads:[~2025-02-05 15:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 20:18 [PATCH v2 0/6] iommu/s390: support additional table regions Matthew Rosato
2025-01-24 20:18 ` [PATCH v2 1/6] iommu/s390: add initial fields to track table size Matthew Rosato
2025-02-05 15:08 ` Niklas Schnelle [this message]
2025-01-24 20:18 ` [PATCH v2 2/6] s390/pci: set appropriate IOTA region type Matthew Rosato
2025-01-24 20:18 ` [PATCH v2 3/6] iommu/s390: support cleanup of additional table regions Matthew Rosato
2025-01-24 20:18 ` [PATCH v2 4/6] iommu/s390: support iova_to_phys for " Matthew Rosato
2025-01-24 20:18 ` [PATCH v2 5/6] iommu/s390: support map/unmap " Matthew Rosato
2025-01-24 20:18 ` [PATCH v2 6/6] iommu/s390: allow larger region tables Matthew Rosato
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=9519c98b6f681aac58201ffef389e2da86111272.camel@linux.ibm.com \
--to=schnelle@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=clegoate@redhat.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjrosato@linux.ibm.com \
--cc=robin.murphy@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox