From: "Denis V. Lunev" <den@openvz.org>
To: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1] iommu/amd/pgtbl: fix DMA faults on IOVAs mapped while the table grows
Date: Tue, 10 Nov 2026 17:56:15 +0100 [thread overview]
Message-ID: <20261110165615.2808447-1-den@openvz.org> (raw)
In-Reply-To: <010701a1c660a906-b6ba27d3-ff61-4efd-843a-2844f8ce8bb6-000000@eu-central-1.amazonses.com>
> [Severity: Medium]
> Can readers livelock on a PREEMPT_RT build here?
The vz10 kernels are not PREEMPT_RT: both x86_64 flavours build with
PREEMPT_VOLUNTARY and PREEMPT_RT unset. There spin_lock_irqsave() keeps
the write section atomic, readers on other CPUs spin for the DTE flush
only, and nothing in amd_iommu_update_and_flush_device_table() reads the
seqcount, so the writer cannot wait on itself. Tested with the section
held open for 5 ms at each of the three level increases: no lockups.
> Is there a way to publish the new root and mode only after the DTEs are
> updated, or to otherwise avoid holding the seqcount odd across the DTE
> flush?
On PREEMPT_RT a plain seqcount_t writer under a sleeping spinlock is
already broken before this patch, as the review notes. Fixing that means
publishing root and mode only after set_dte_entry() can take them
explicitly, as mainline does since 789a5913b29c. Not worth it for a
configuration we do not build.
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-10 16:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 16:45 Denis V. Lunev
2026-11-10 16:53 ` no-reply
2026-11-10 16:56 ` Denis V. Lunev [this message]
2026-11-10 17:53 ` Konstantin Khorenko
2026-11-10 17:53 ` Konstantin Khorenko
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=20261110165615.2808447-1-den@openvz.org \
--to=den@openvz.org \
--cc=devel@openvz.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.