[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <02c3adb0-ff46-45ea-a67f-8d4728302b3b@nvidia.com>
Date: Fri, 17 Jan 2025 10:41:26 -0800
From: Tushar Dave <tdave@...dia.com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: corbet@....net, bhelgaas@...gle.com, paulmck@...nel.org,
akpm@...ux-foundation.org, thuth@...hat.com, rostedt@...dmis.org,
xiongwei.song@...driver.com, vidyas@...dia.com, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org, vsethi@...dia.com,
sdonthineni@...dia.com
Subject: Re: [PATCH 1/1] PCI: Fix Extend ACS configurability
On 1/17/25 05:28, Jason Gunthorpe wrote:
> On Thu, Jan 16, 2025 at 05:21:29PM -0800, Tushar Dave wrote:
>
>> - /* If mask is 0 then we copy the bit from the firmware setting. */
>> - caps->ctrl = (caps->ctrl & ~mask) | (caps->fw_ctrl & mask);
>> - caps->ctrl |= flags;
>> + /* For mask bits that are 0 copy them from the firmware setting
>> + * and apply flags for all the mask bits that are 1.
>> + */
>> + caps->ctrl = (caps->fw_ctrl & ~mask) | (flags & mask);
>>
>>
>> I ran some sanity tests and looks good. Can I send V2 now?
>
> I think so, I'm just wondering if this is not quite it either - this
> will always throw away any changes any of the other calls made to
> ctrl prior to getting here.
Yes.
>
> So we skip the above if the kernel command line does not refer to the
> device?
That is correct as well.
>
> Ie if the command line refers to the device then it always superceeds
> everything, otherwise the other stuff keeps working the way it worked
> before??
Yup.
If kernel commandline is present (either config_acs or disable_acs_redir) and
device match occurs in function '__pci_config_acs', we discard any changes done
to ctrl by kernel prior to this call. Else we do not touch ctrl and it works as
before.
And IMO, that is how it should be. This gives admin a control to configure ACS
using kernel parameter based on ACS value that FW has set (and not kernel).
-Tushar
>
> Jason
Powered by blists - more mailing lists