From: Oliver Upton Date: Wed, 19 Mar 2025 21:53:09 +0000 (-0700) Subject: Merge branch 'kvm-arm64/pv-cpuid' into kvmarm/next X-Git-Tag: v6.15-rc1~195^2~2^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d300b0168ea8fd5022a1413bd37ab63f4e5a7d4d;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'kvm-arm64/pv-cpuid' into kvmarm/next * kvm-arm64/pv-cpuid: : Paravirtualized implementation ID, courtesy of Shameer Kolothum : : Big-little has historically been a pain in the ass to virtualize. The : implementation ID (MIDR, REVIDR, AIDR) of a vCPU can change at the whim : of vCPU scheduling. This can be particularly annoying when the guest : needs to know the underlying implementation to mitigate errata. : : "Hyperscalers" face a similar scheduling problem, where VMs may freely : migrate between hosts in a pool of heterogenous hardware. And yes, our : server-class friends are equally riddled with errata too. : : In absence of an architected solution to this wart on the ecosystem, : introduce support for paravirtualizing the implementation exposed : to a VM, allowing the VMM to describe the pool of implementations that a : VM may be exposed to due to scheduling/migration. : : Userspace is expected to intercept and handle these hypercalls using the : SMCCC filter UAPI, should it choose to do so. smccc: kvm_guest: Fix kernel builds for 32 bit arm KVM: selftests: Add test for KVM_REG_ARM_VENDOR_HYP_BMAP_2 smccc/kvm_guest: Enable errata based on implementation CPUs arm64: Make  _midr_in_range_list() an exported function KVM: arm64: Introduce KVM_REG_ARM_VENDOR_HYP_BMAP_2 KVM: arm64: Specify hypercall ABI for retrieving target implementations arm64: Modify _midr_range() functions to read MIDR/REVIDR internally Signed-off-by: Oliver Upton --- d300b0168ea8fd5022a1413bd37ab63f4e5a7d4d diff --cc arch/arm64/kvm/vgic/vgic-v3.c index 73a8a7df4bd23,87a8a96c7a41e..b9ad7c42c5b01 --- a/arch/arm64/kvm/vgic/vgic-v3.c +++ b/arch/arm64/kvm/vgic/vgic-v3.c @@@ -631,8 -632,8 +631,8 @@@ static const struct midr_range broken_s static bool vgic_v3_broken_seis(void) { - return ((kvm_vgic_global_state.ich_vtr_el2 & ICH_VTR_SEIS_MASK) && + return ((kvm_vgic_global_state.ich_vtr_el2 & ICH_VTR_EL2_SEIS) && - is_midr_in_range_list(read_cpuid_id(), broken_seis)); + is_midr_in_range_list(broken_seis)); } /**