All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel IOMMU] Question about memory ordering in context/PASID entry updates
@ 2025-12-04 16:49 Dmytro Maluka
  2025-12-05  5:32 ` Baolu Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Dmytro Maluka @ 2025-12-04 16:49 UTC (permalink / raw)
  To: iommu
  Cc: David Woodhouse, Lu Baolu, Vineeth Pillai (Google),
	Aashish Sharma, Grzegorz Jaszczyk, Chuanxiao Dong, Kevin Tian

When updating a context or PASID entry, we'd better make sure we set the
present bit after setting up other bits, not before, right? And indeed,
for example, in domain_context_mapping_one() we are doing it in the
following order:

	context_clear_entry(context);
	<set other bits>
	context_set_present(context);

But it doesn't look like we have any compiler barriers to actually
ensure this order? (And in case of context entries, there is even no
WRITE_ONCE or anything like that.)

So, are we just hoping that the compiler will not reorder it?

What am I missing?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-12-07  3:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04 16:49 [Intel IOMMU] Question about memory ordering in context/PASID entry updates Dmytro Maluka
2025-12-05  5:32 ` Baolu Lu
2025-12-05 14:09   ` Dmytro Maluka
2025-12-07  3:35     ` Baolu Lu

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.