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]
Date:   Thu, 24 Nov 2022 16:55:17 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Marc Zyngier <maz@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
        linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jason Gunthorpe <jgg@...lanox.com>,
        Dave Jiang <dave.jiang@...el.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        Kevin Tian <kevin.tian@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Logan Gunthorpe <logang@...tatee.com>,
        Ashok Raj <ashok.raj@...el.com>, Jon Mason <jdmason@...zu.us>,
        Allen Hubbe <allenbh@...il.com>
Subject: Re: [patch V2 09/21] genirq/msi: Make MSI descriptor iterators
 device domain aware

On Thu, Nov 24 2022 at 15:46, Marc Zyngier wrote:
> On Mon, 21 Nov 2022 14:36:29 +0000,
> Thomas Gleixner <tglx@...utronix.de> wrote:
>> +static int msi_get_domain_base_index(struct device *dev, unsigned int domid)
>> +{
>> +	lockdep_assert_held(&dev->msi.data->mutex);
>> +
>> +	if (WARN_ON_ONCE(domid >= MSI_MAX_DEVICE_IRQDOMAINS))
>> +		return -ENODEV;
>> +
>> +	if (WARN_ON_ONCE(!dev->msi.data->__irqdomains[domid]))
>> +		return -ENODEV;
>> +
>> +	return domid * MSI_XA_DOMAIN_SIZE;
>> +}
>
> So what I understand of this is that we split the index space into
> segments, one per msi_domain_ids, MSI_XA_DOMAIN_SIZE apart.
>
> Why didn't you decide to go all the way and have one xarray per
> irqdomain? It's not that big a structure, and it would make the whole
> thing a bit more straightforward.
>
> Or do you anticipate cases where you'd walk the __store xarray across
> irqdomains?

Not really. I just found it conveniant to deal with one, but yes we
could do the same thing with two xarrays.

But at the very end it does not make a huge difference. Fine with me
either way.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ