From: Marc Zyngier Date: Fri, 23 May 2025 09:59:43 +0000 (+0100) Subject: Merge branch kvm-arm64/misc-6.16 into kvmarm-master/next X-Git-Tag: v6.16-rc1~78^2^2~8 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1b85d923ba8c9e6afaf19e26708411adde94fba8;p=linux-block.git Merge branch kvm-arm64/misc-6.16 into kvmarm-master/next * kvm-arm64/misc-6.16: : . : Misc changes and improvements for 6.16: : : - Add a new selftest for the SVE host state being corrupted by a guest : : - Keep HCR_EL2.xMO set at all times for systems running with the kernel at EL2, : ensuring that the window for interrupts is slightly bigger, and avoiding : a pretty bad erratum on the AmpereOne HW : : - Replace a couple of open-coded on/off strings with str_on_off() : : - Get rid of the pKVM memblock sorting, which now appears to be superflous : : - Drop superflous clearing of ICH_LR_EOI in the LR when nesting : : - Add workaround for AmpereOne's erratum AC04_CPU_23, which suffers from : a pretty bad case of TLB corruption unless accesses to HCR_EL2 are : heavily synchronised : : - Add a per-VM, per-ITS debugfs entry to dump the state of the ITS tables : in a human-friendly fashion : . KVM: arm64: Fix documentation for vgic_its_iter_next() KVM: arm64: vgic-its: Add debugfs interface to expose ITS tables arm64: errata: Work around AmpereOne's erratum AC04_CPU_23 KVM: arm64: nv: Remove clearing of ICH_LR.EOI if ICH_LR.HW == 1 KVM: arm64: Drop sort_memblock_regions() KVM: arm64: selftests: Add test for SVE host corruption KVM: arm64: Force HCR_EL2.xMO to 1 at all times in VHE mode KVM: arm64: Replace ternary flags with str_on_off() helper Signed-off-by: Marc Zyngier --- 1b85d923ba8c9e6afaf19e26708411adde94fba8 diff --cc arch/arm64/kvm/at.c index da5359668b9c,9c13e70fadf5..a25be111cd8f --- a/arch/arm64/kvm/at.c +++ b/arch/arm64/kvm/at.c @@@ -1244,8 -1266,8 +1244,8 @@@ static u64 __kvm_at_s1e01_fast(struct k __load_stage2(mmu, mmu->arch); skip_mmu_switch: - /* Clear TGE, enable S2 translation, we're rolling */ - write_sysreg_hcr((config.hcr & ~HCR_TGE) | HCR_VM); + /* Temporarily switch back to guest context */ - write_sysreg(vcpu->arch.hcr_el2, hcr_el2); ++ write_sysreg_hcr(vcpu->arch.hcr_el2); isb(); switch (op) { @@@ -1277,8 -1299,6 +1277,8 @@@ if (!fail) par = read_sysreg_par(); - write_sysreg(HCR_HOST_VHE_FLAGS, hcr_el2); ++ write_sysreg_hcr(HCR_HOST_VHE_FLAGS); + if (!(vcpu_el2_e2h_is_set(vcpu) && vcpu_el2_tge_is_set(vcpu))) __mmu_config_restore(&config);