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] [thread-next>] [day] [month] [year] [list]
Message-ID: <19435dae-89b5-4c23-af1e-c8917e29c857@linux.microsoft.com>
Date: Tue, 18 Feb 2025 14:32:06 -0800
From: Roman Kisel <romank@...ux.microsoft.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: arnd@...db.de, bhelgaas@...gle.com, bp@...en8.de,
 catalin.marinas@....com, conor+dt@...nel.org, dave.hansen@...ux.intel.com,
 decui@...rosoft.com, haiyangz@...rosoft.com, hpa@...or.com,
 krzk+dt@...nel.org, kw@...ux.com, kys@...rosoft.com, lpieralisi@...nel.org,
 manivannan.sadhasivam@...aro.org, mingo@...hat.com, robh@...nel.org,
 ssengar@...ux.microsoft.com, tglx@...utronix.de, wei.liu@...nel.org,
 will@...nel.org, devicetree@...r.kernel.org, linux-arch@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-hyperv@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org, x86@...nel.org,
 benhill@...rosoft.com, bperkins@...rosoft.com, sunilmut@...rosoft.com
Subject: Re: [PATCH hyperv-next v4 6/6] PCI: hv: Get vPCI MSI IRQ domain from
 DeviceTree



On 2/12/2025 9:42 AM, Bjorn Helgaas wrote:
> On Tue, Feb 11, 2025 at 05:43:21PM -0800, Roman Kisel wrote:

[...]

>> +	 * function called later.
> 
> The rest of this file fits in 80 columns; please wrap this to match.
> 

Will fix, thank you for taking the time to review that!

>> +	 */
>> +	if (!domain)
>> +		WARN_ONCE(1, "No interrupt-parent found, check the DeviceTree data.\n");
> 
> Is there a way to include a hint about what specific part of the
> devicetree to look at, e.g., the node that lacks a parent?

I'll improve this, will mention the bus, thanks!

[...]

>> +	 * the messy ifdef below.
> 
> Add a blank line if you intend a new paragraph here.  Otherwise, wrap
> to fill 78 columns or so.

Will fix this, appreciate noticing that!

> 
>> +	 * There is apparently no such default in the OF subsystem, and
>> +	 * `hv_pci_of_irq_domain_parent` finds the parent IRQ domain that
>> +	 * points to the GIC as well.
> 
> And here.

Will fix, thanks!

>> +	 * None of these two cases reaches for the MSI parent domain.
> 
> I don't know what "reaches for the MSI parent domain" means.  Neither
> "searches for"?
> 

My bad, sorry about the incomprehensible phrasing! Will fix this, thank
you!

>>   	 */
>> -	hv_msi_gic_irq_domain = acpi_irq_create_hierarchy(0, HV_PCI_MSI_SPI_NR,
>> -							  fn, &hv_pci_domain_ops,
>> -							  chip_data);
>> +#ifdef CONFIG_ACPI
>> +	if (!acpi_disabled)
>> +		hv_msi_gic_irq_domain = acpi_irq_create_hierarchy(0, HV_PCI_MSI_SPI_NR,
>> +			fn, &hv_pci_domain_ops,
>> +			chip_data);
>> +#endif
>> +#if defined(CONFIG_OF)
>> +	if (!hv_msi_gic_irq_domain)
>> +		hv_msi_gic_irq_domain = irq_domain_create_hierarchy(
>> +			hv_pci_of_irq_domain_parent(), 0, HV_PCI_MSI_SPI_NR,
>> +			fn, &hv_pci_domain_ops,
>> +			chip_data);
>> +#endif
> 
> I don't know if acpi_irq_create_hierarchy() is helping or hurting
> here.  It obscures the fact that the only difference is the first
> argument to irq_domain_create_hierarchy().  If we could open-code or
> have a helper to figure out that irq_domain "parent" argument for the
> ACPI case, then we'd only have one call of
> irq_domain_create_hierarchy() here and it seems like it might be
> simpler.
> 

That looks quite dirty, no dispute over that... The root device was
static/provate for the ACPI case, and I didn't go for changing the ACPI
subsystem code to improve this patch, thought the only user wouldn't
justify tinkering with the whole ACPI subsystem. Maybe I also will
need to see if that can be used from a module/builti-in, locking,
bogus usage, i.e. all that normally comes with promoting a private
interface to public.

Let me work out the details and post the change here to see what
feedback that receives.

Last but certainly not least: owing a great debt of gratitude to you
(and all other folks) for helping in bringing this to the best shape
possible!

-- 
Thank you,
Roman


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ