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: <87sficiojx.ffs@tglx>
Date:   Mon, 21 Nov 2022 11:34:26 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "Tian, Kevin" <kevin.tian@...el.com>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     "x86@...nel.org" <x86@...nel.org>, Joerg Roedel <joro@...tes.org>,
        Will Deacon <will@...nel.org>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Marc Zyngier <maz@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jason Gunthorpe <jgg@...lanox.com>,
        "Jiang, Dave" <dave.jiang@...el.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        "Williams, Dan J" <dan.j.williams@...el.com>,
        Logan Gunthorpe <logang@...tatee.com>,
        "Raj, Ashok" <ashok.raj@...el.com>, Jon Mason <jdmason@...zu.us>,
        Allen Hubbe <allenbh@...il.com>,
        "Ahmed S. Darwish" <darwi@...utronix.de>,
        "Chatre, Reinette" <reinette.chatre@...el.com>
Subject: RE: [patch 17/20] platform-msi: Switch to the domain id aware MSI
 interfaces

On Mon, Nov 21 2022 at 03:42, Kevin Tian wrote:
>> From: Thomas Gleixner <tglx@...utronix.de>
>> On Fri, Nov 18 2022 at 08:53, Kevin Tian wrote:
>> > Out of curiosity. Why don't we provide an unlocked version of
>> > msi_domain_alloc_irqs_all()?
>> 
>> -ENOUSER
>
> msi_domain_alloc_irqs() and msi_domain_alloc_irqs_descs_locked()
> are a pair.

Sure, but if there is no use case why should we provide the interface?

> What I didn't get was why the unlocked invocation in this patch
> is replaced by a range-based helper while the locked invocation
> in previous patch16 was replaced by an all-based helper:
>
> 	if (domain && irq_domain_is_hierarchy(domain))
> -		return msi_domain_alloc_irqs_descs_locked(domain, &dev->dev, nvec);
> +		return msi_domain_alloc_irqs_all_locked(&dev->dev, MSI_DEFAULT_DOMAIN, nvec);
>
> The reason could probably be marked out in the commit msg.

The point is that range based is obviously the better choice because
it's precise. Especially for domains which let the core code allocate
the MSI descriptors a precise range is required. The old interface was
kinda blury there.

In case of PCI/MSI[-X] the MSI descriptors are allocated by the PCI core
upfront and there are allocations which have gaps in the indices, so the
range is not well defined and we just keep using the existing scan all
mechanism.

Thanks,

        tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ