Question about the "TLBs and I-cache are private to each vCPU" guarantee with VTTBR_EL2.CnP

Will Deacon will at kernel.org
Mon Jul 6 08:18:52 PDT 2026


On Mon, Jul 06, 2026 at 10:15:04PM +0800, Tangnianyao wrote:
> Two SMT threads(PE0,PE1) on the same physical core share TLB.

For that to be observable, I think both PEs must be configured with CnP
enabled.

> VM0 has 2 vcpus, vcpu0 and vcpu1 that share all architectural context
> except the address translation context.
> 
> Vcpu0 may observe TLB entries that are supposed to be private to vcpu1
> in the following case:
> 
>     PE0(core0,smt0)         PE1(core0,smt1)
> vcpu0 load           
> vcpu0 va->pa0        
> vcpu0 put            
>                                        vcpu1 load
>                                        vcpu1 flush local tlb
>                                        vcpu1 modify desc to va->pa1
> vcpu0 load
> vcpu0 hit *va->pa1*

If they're "supposed to be private", why have the vCPUs configured CnP
at stage-1?

Will



More information about the linux-arm-kernel mailing list