From: Tushar Dave <tdave@nvidia.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: corbet@lwn.net, bhelgaas@google.com, paulmck@kernel.org,
akpm@linux-foundation.org, thuth@redhat.com, rostedt@goodmis.org,
xiongwei.song@windriver.com, vidyas@nvidia.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, vsethi@nvidia.com,
sdonthineni@nvidia.com
Subject: Re: [PATCH 1/1] PCI: Fix Extend ACS configurability
Date: Fri, 17 Jan 2025 10:41:26 -0800 [thread overview]
Message-ID: <02c3adb0-ff46-45ea-a67f-8d4728302b3b@nvidia.com> (raw)
In-Reply-To: <20250117132802.GB5556@nvidia.com>
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
next prev parent reply other threads:[~2025-01-17 18:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 20:29 [PATCH 1/1] PCI: Fix Extend ACS configurability Tushar Dave
2024-12-14 12:30 ` Vidya Sagar
2025-01-02 18:40 ` Jason Gunthorpe
2025-01-06 20:34 ` Tushar Dave
2025-01-06 20:53 ` Bjorn Helgaas
2025-01-08 2:34 ` Tushar Dave
2025-01-07 0:10 ` Jason Gunthorpe
2025-01-08 2:32 ` Tushar Dave
2025-01-08 15:10 ` Jason Gunthorpe
2025-01-09 3:13 ` Tushar Dave
2025-01-13 20:07 ` Jason Gunthorpe
2025-01-16 3:11 ` Tushar Dave
2025-01-16 19:01 ` Jason Gunthorpe
2025-01-17 1:21 ` Tushar Dave
2025-01-17 13:28 ` Jason Gunthorpe
2025-01-17 18:41 ` Tushar Dave [this message]
2025-01-02 23:26 ` Bjorn Helgaas
2025-01-06 20:45 ` Tushar Dave
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=02c3adb0-ff46-45ea-a67f-8d4728302b3b@nvidia.com \
--to=tdave@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=jgg@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=rostedt@goodmis.org \
--cc=sdonthineni@nvidia.com \
--cc=thuth@redhat.com \
--cc=vidyas@nvidia.com \
--cc=vsethi@nvidia.com \
--cc=xiongwei.song@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox