Skip to content

KVM: arm64: Fix soft-lockup on 64KB host to boot 4KB guest

Gavin Shan requested to merge (removed):jira-1859 into main

JIRA: https://issues.redhat.com/browse/RHEL-1859
Upstream Status: v6.7.rc1
Tested: No soft-lockup on system with Ampere Altra Max CPU

All guest's CPUs can be trapped to host due to parallel page faults.
After the faulting (huge) page is resolved, its corresponding icache
needs to be invalidated so that dcache and icache are synchronized.
579ms is consumed to invalidate icache for a 512MB huge page on Ampere
Altra Max CPU and can lead to soft-lockup in the guest if it has more
than 20 vCPUs.

Pick up the following upstream commits to fix the issue. The entire
icache instead of the matched icache lines are invalidated for this
particular case to save the used time, in order to avoid the soft-lockup
issue in the guest. Commit c4b9fd2ac035 is picked to avoid contextual
conflict.

909b583f81b5 KVM: arm64: Avoid soft lockups due to I-cache maintenance
ec1c3b9ff160 arm64: tlbflush: Rename MAX_TLBI_OPS
c4b9fd2ac035 KVM: arm64: Drop is_kernel_in_hyp_mode() from __invalidate_icache_guest_page()

Signed-off-by: Gavin Shan gshan@redhat.com

Edited by Gavin Shan

Merge request reports