On Wed, 19 Feb 2025 14:07:37 -0800, Oliver Upton wrote:
Vladimir reports that a race condition to attach a VMID to a stage-2 MMU sometimes results in a vCPU entering the guest with a VMID of 0:
| CPU1 | CPU2 | | | | kvm_arch_vcpu_ioctl_run | | vcpu_load <= load VTTBR_EL2 | | kvm_vmid->id = 0 | | | kvm_arch_vcpu_ioctl_run | | vcpu_load <= load VTTBR_EL2 | | with kvm_vmid->id = 0| | kvm_arm_vmid_update <= allocates fresh | | kvm_vmid->id and | | reload VTTBR_EL2 | | | | | kvm_arm_vmid_update <= observes that kvm_vmid->id | | already allocated, | | skips reload VTTBR_EL2
[...]
Applied to fixes, thanks!
[1/1] KVM: arm64: Ensure a VMID is allocated before programming VTTBR_EL2 commit: fa808ed4e199ed17d878eb75b110bda30dd52434
Cheers,
M.