|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 4/4] x86: tighten PCI-related locking assertions
On Tue, Nov 17, 2026 at 12:11:42PM +0100, Jan Beulich wrote:
> On 17.11.2026 11:41, Roger Pau Monné wrote:
> > On Thu, Oct 29, 2026 at 03:25:04PM +0100, Jan Beulich wrote:
> >> With recent changes the .pi_update_irte() hook as well as
> >> {,un}map_domain_pirq() and allocate_and_map_msi_pirq() won't be called
> >> anymore with the global PCI lock held. Convert the assertions to check for
> >> just the domain's PCI lock.
> >>
> >> With that the somewhat ugly ASSERT_PDEV_LIST_IS_READ_LOCKED() isn't used
> >> outside of msi.c anymore, so move the #define there.
> >>
> >> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> >
> > Acked-by: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
>
> Thanks. I'm a bit puzzled about your further remarks, though.
>
> > I agree about keeping a single ASSERT_PDEV_LIST_IS_READ_LOCKED()
> > definitions and dropping the unneeded NDEBUG preprocessor conditional.
>
> Here you look to agree with ...
>
> >> ---
> >> It being just two use sites which remain, we may want to do away with
> >> ASSERT_PDEV_LIST_IS_READ_LOCKED() altogether. Thoughts?
> >
> > IIRC the reason for having this expression was so it could be used
> > everywhere to ensure the domain pdev list was somehow locked (either
> > by pcidevs lock or the per-domain rwlock).
> >
> > If we now have fine grained control over the locking it possibly makes
> > no sense to keep it.
> >
> >> (It also isn't
> >> qite clear to me why its #define(s) sit inside an #ifdef: The expression
> >> used ought to be fine to use also in release builds, as it looks.)
>
> ... this observation, just to ...
>
> > Hm, I'm not sure. It looks like the debug expression could be used in
> > non-debug builds.
>
> ... voice uncertainty here. And then ...
Uncertainty about why debug vs non-debug variants of the expression
were added in the first place :). I agree with you and see no need
for them.
Thanks, Roger
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |