lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9519c98b6f681aac58201ffef389e2da86111272.camel@linux.ibm.com>
Date: Wed, 05 Feb 2025 16:08:44 +0100
From: Niklas Schnelle <schnelle@...ux.ibm.com>
To: Matthew Rosato <mjrosato@...ux.ibm.com>, joro@...tes.org, will@...nel.org,
        robin.murphy@....com, gerald.schaefer@...ux.ibm.com
Cc: hca@...ux.ibm.com, gor@...ux.ibm.com, agordeev@...ux.ibm.com,
        svens@...ux.ibm.com, borntraeger@...ux.ibm.com, clegoate@...hat.com,
        iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
        linux-s390@...r.kernel.org
Subject: Re: [PATCH v2 1/6] iommu/s390: add initial fields to track table
 size

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@...ux.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ