Re: [PATCH v2 0/5] iommu/vt-d: Ensure memory ordering in context & root entry updates

From: Jason Gunthorpe

Date: Tue Jan 06 2026 - 11:45:21 EST


On Tue, Jan 06, 2026 at 04:50:11PM +0100, Dmytro Maluka wrote:
> So we'd better make sure that if it happens before the barrier (i.e.
> when the device is not supposed to do DMA), the compiler (and thus
> the CPU) doesn't set the present bit, so it stays non-present, so
> the IOMMU will block this unexpected/malicious DMA?

It is true that any write to the dword containing the present bit
(only!) should probably use WRITE_ONCE.

Jason