On Fri, Jul 10, 2026 at 08:15:03PM +0900, Akihiko Odaki wrote:
> @@ -813,6 +842,15 @@ void kvm_host_pmu_init(struct arm_pmu *pmu)
> if (!pmuv3_implemented(kvm_arm_pmu_get_pmuver_limit()))
> return;
>
> + /*
> + * IMPDEF PMUv3 traps are non-architectural, and KVM cannot assume a
> + * uniform PMUv3-compatible arm_pmu is available on all CPUs.
> + */
> + if (cpus_have_final_cap(ARM64_WORKAROUND_PMUV3_IMPDEF_TRAPS)) {
> + kvm_info("Non-architectural PMU, tainting kernel\n");
> + add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
> + }
> +
This is an unrelated change, and really the taint should be added with the
.cpu_enable() for this capability. That's the point where we flip the
magic bit.
> +void kvm_vcpu_load_pmu(struct kvm_vcpu *vcpu, int last_cpu)
> +{
> + if (!kvm_pmu_fixed_counters_only(vcpu->kvm) || vcpu->cpu == last_cpu ||
> last_cpu == -1)
^~~~~~~~~~~~~~
Does this do anything other than avoid a spurious reload on the first KVM_RUN?
Thanks,
Oliver