Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Question about the "TLBs and I-cache are private to each vCPU" guarantee with VTTBR_EL2.CnP
@ 2026-07-04  7:45 Tangnianyao
  2026-07-05 17:28 ` Wei-Lin Chang
  0 siblings, 1 reply; 11+ messages in thread
From: Tangnianyao @ 2026-07-04  7:45 UTC (permalink / raw)
  To: Marc Zyngier, oupton, joey.gouly, seiden, suzuki.poulose,
	yuzenghui, catalin.marinas, will, linux-arm-kernel, kvmarm,
	linux-kernel
  Cc: guoyang (C), huanglingyan (A), Wangzhou (B)

Hi, all

I'm trying to understand the TLB and I-cache invalidation in
`kvm_arch_vcpu_load()` that is intended to "guarantee that both TLBs and
I-cache are private to each vCPU".

As I understand it, when `VTTBR_EL2.CnP == 1`, `__kvm_flush_cpu_context()`
only performs a local TLB and I-cache invalidation, which does not seem
sufficient to guarantee that property.

In fact, even if the invalidation were extended to the Inner Shareable
domain, it still seems difficult to guarantee “TLBs and I-cache are
private to each vCPU”, when `VTTBR_EL2.CnP == 1`, as long as multiple
vCPUs from the same VM may be running concurrently on different PEs.

So I have two questions:

1. What is the rationale behind the comment that "guarantee that both TLBs
and I-cache are private to each vCPU"?
2. Should the effect of `VTTBR_EL2.CnP` be taken into account when
reasoning about this guarantee?

Thanks
Nianyao Tang



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

end of thread, other threads:[~2026-07-07  6:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-04  7:45 Question about the "TLBs and I-cache are private to each vCPU" guarantee with VTTBR_EL2.CnP Tangnianyao
2026-07-05 17:28 ` Wei-Lin Chang
2026-07-06  3:30   ` Tangnianyao
2026-07-06  7:25     ` Marc Zyngier
2026-07-06  8:25       ` Tangnianyao
2026-07-06  8:44         ` Marc Zyngier
2026-07-06 14:15           ` Tangnianyao
2026-07-06 15:18             ` Will Deacon
2026-07-06 15:33             ` Mark Rutland
2026-07-07  2:41               ` Tangnianyao
2026-07-07  6:36                 ` Oliver Upton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox