Re: [PATCH 0/2] KVM: x86: Do runtime updates during KVM_SET_CPUID2
From: Sean Christopherson
Date: Fri Dec 05 2025 - 12:00:26 EST
On Mon, 01 Dec 2025 17:50:47 -0800, Sean Christopherson wrote:
> Do runtime updates (if necessary) when userspace sets CPUID to fix a bug
> where KVM drops a pending update (KVM will clear the dirty flag when doing
> updates on the new/incoming CPUID). The bug most visibly manifests as an
> -EINVAL failure on KVM_SET_CPUID{,2} due to the old/current CPUID not
> matching the new/incoming CPUID, but if userspace were to continue running
> past the failure, the vCPU would run with stale CPUID/caps.
>
> [...]
Applied to kvm-x86 fixes, thanks!
[1/2] KVM: x86: Apply runtime updates to current CPUID during KVM_SET_CPUID{,2}
https://github.com/kvm-x86/linux/commit/e2b43fb25243
[2/2] KVM: selftests: Add a CPUID testcase for KVM_SET_CPUID2 with runtime updates
https://github.com/kvm-x86/linux/commit/824d227324dc
--
https://github.com/kvm-x86/linux/tree/next