[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251202015049.1167490-1-seanjc@google.com>
Date: Mon, 1 Dec 2025 17:50:47 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Igor Mammedov <imammedo@...hat.com>
Subject: [PATCH 0/2] KVM: x86: Do runtime updates during KVM_SET_CPUID2
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.
Sean Christopherson (2):
KVM: x86: Apply runtime updates to current CPUID during
KVM_SET_CPUID{,2}
KVM: selftests: Add a CPUID testcase for KVM_SET_CPUID2 with runtime
updates
arch/x86/kvm/cpuid.c | 11 +++++++++--
tools/testing/selftests/kvm/x86/cpuid_test.c | 15 +++++++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
base-commit: 115d5de2eef32ac5cd488404b44b38789362dbe6
--
2.52.0.107.ga0afd4fd5b-goog
Powered by blists - more mailing lists