ANDROID: KVM: arm64: Free stage-2 pgt in kvm_arch_destroy_vm()
All the MMU notifiers as well as stage2_apply_range() currently check the
existence of the stage-2 pgt in case of a concurrent execution of
kvm_arch_flush_shadow_all(). To simplify re-using stage2_apply_range()
in the context of pKVM where the stage-2 pgt is never allocated on the
host side, change the implementation of kvm_arch_flush_shadow_all() to
unmap the entire page-table, but keep the PGD around and free it later
from kvm_arch_destroy_vm(). This allows to remove all the checks on the
pgt struct as standard KVM (non-protected) can now rely on it being
allocated for the guest's lifetime.
No functional changes intended.
Bug: 357781595
Change-Id: I01a99226fc19d0e7077f475a11189801886337fb
Signed-off-by:
Quentin Perret <qperret@google.com>
Loading
Please sign in to comment