Commit 960d3742 authored by Quentin Perret's avatar Quentin Perret Committed by Treehugger Robot
Browse files

ANDROID: KVM: arm64: Handle races gracefully in pkvm_relax_perms()



We may encounter a race between MMU notifiers and the perm fault path in
KVM where the faulting PFN is gone from the maple tree by the time we
check it in pkvm_relax_perms(). Although that race is benign, it
currently causes the vCPU to exit with -EFAULT, which is generally fatal
for the guest.

To avoid this problem, let's return -EAGAIN instead and give the guest
another chance.

Bug: 389901612
Change-Id: Ie98e1162a558126c8c6e83f0621460966c09b7ad
Signed-off-by: default avatarQuentin Perret <qperret@google.com>
parent e6c09143
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment