summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/autoload.c
diff options
context:
space:
mode:
authorFuad Tabba <tabba@google.com>2025-08-07 15:01:32 +0300
committerOliver Upton <oliver.upton@linux.dev>2025-08-08 11:29:32 +0300
commit798eb597870064bff28d8a41cb5197725f7dc6f2 (patch)
tree2a6efd00efa69f4d839c426f337c355d205c65e1 /tools/testing/selftests/bpf/prog_tests/autoload.c
parenteaa43934b412f0381598e308b6a25d6c9a5dce2d (diff)
downloadlinux-798eb597870064bff28d8a41cb5197725f7dc6f2.tar.xz
KVM: arm64: Sync protected guest VBAR_EL1 on injecting an undef exception
In pKVM, a race condition can occur if a guest updates its VBAR_EL1 register and, before a vCPU exit synchronizes this change, the hypervisor needs to inject an undefined exception into a protected guest. In this scenario, the vCPU still holds the stale VBAR_EL1 value from before the guest's update. When pKVM injects the exception, it ends up using the stale value. Explicitly read the live value of VBAR_EL1 from the guest and update the vCPU value immediately before pending the exception. This ensures the vCPU's value is the same as the guest's and that the exception will be handled at the correct address upon resuming the guest. Reported-by: Keir Fraser <keirf@google.com> Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://lore.kernel.org/r/20250807120133.871892-3-tabba@google.com Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions