From: Alex Williamson <alex.williamson@nvidia.com>
To: Guixin Liu <kanie@linux.alibaba.com>
Cc: kvm <kvm@vger.kernel.org>, Alex Williamson <alex@shazbot.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com>
Subject: Re: [PATCH v2 5/5] vfio/pci: Latch all module parameters per device
Date: Fri, 12 Jun 2026 09:05:24 -0600 [thread overview]
Message-ID: <20260612090524.6101e9e5@nvidia.com> (raw)
In-Reply-To: <6d737961-1276-42e2-bb74-510d0f041040@linux.alibaba.com>
On Fri, 12 Jun 2026 14:25:16 +0800
Guixin Liu <kanie@linux.alibaba.com> wrote:
> Hi Alex,
>
> In many cases, when users modify a module parameter, they expect
> the change to take effect immediately, but that's not at all what
> happens here. So I think on the one hand, we should make the module
> parameter read-only; on the other hand, we could also expose this
> information in the PCI core device's sysfs directory — read-only as well
> for now,
> or perhaps there's an even better approach?
nointxmask never took effect immediately, it was at best setup when the
device is opened. We could support that behavior again, but it's
actually more limiting, all devices supporting INTx would latch
nointxmask on open and therefore require an exclusive interrupt. I've
encountered this in debugging, where it's more useful to isolate
nointxmask to a single device rather than modify the VM config to
remove devices or unload host drivers to free IRQ lines.
disable_idle_d3 manages the power state of unused devices, where
setting disable_idle_d3 never woke devices that were already bound and
idle, it only affected future use of low power states. I do still see
value in directing this behavior to specific devices, it's a runtime
diagnostic versus directing users to set quirk flags and recompile
their kernel.
Therefore, neither of these are really improved by making the module
parameter itself read-only.
Given these are largely diagnostic, debugfs would be the more natural
way to expose it versus sysfs. We already have some support for
debugfs for exposing migration features and state. This might be a
good idea, but I'd also argue it's more of a feature scope, whereas I'd
really like to get the Fixes: and behavior restoration scoped change in
tree asap. Thanks,
Alex
next prev parent reply other threads:[~2026-06-12 15:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 21:35 [PATCH v2 0/5] vfio/pci: Latch module params, fix bitfield use and VGA unwind Alex Williamson
2026-06-11 21:35 ` [PATCH v2 1/5] vfio/pci: Latch disable_idle_d3 per device Alex Williamson
2026-06-11 21:35 ` [PATCH v2 2/5] vfio/pci: Release the VGA arbiter client on register_device() failure Alex Williamson
2026-06-11 21:35 ` [PATCH v2 3/5] vfio/pci: Fix racy bitfields and tighten struct layout Alex Williamson
2026-06-11 21:35 ` [PATCH v2 4/5] vfio/mlx5: " Alex Williamson
2026-06-11 21:35 ` [PATCH v2 5/5] vfio/pci: Latch all module parameters per device Alex Williamson
2026-06-12 6:25 ` Guixin Liu
2026-06-12 15:05 ` Alex Williamson [this message]
2026-06-12 8:40 ` fengchengwen
2026-06-12 14:11 ` Alex Williamson
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=20260612090524.6101e9e5@nvidia.com \
--to=alex.williamson@nvidia.com \
--cc=alex@shazbot.org \
--cc=jgg@ziepe.ca \
--cc=kanie@linux.alibaba.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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