]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: Update Xen TSC leaves during CPUID emulation
authorFred Griffoul <fgriffo@amazon.co.uk>
Fri, 24 Jan 2025 15:05:39 +0000 (15:05 +0000)
committerSean Christopherson <seanjc@google.com>
Tue, 25 Feb 2025 15:09:55 +0000 (07:09 -0800)
commita2b00f85d7839d74a2f6fcbf547d4bf2e82c34e5
treeae03428a7cd98b7a327c22f76d831de7c6628bd1
parent26e228ec169501110c451ee28b3d9c0cb8fb5923
KVM: x86: Update Xen TSC leaves during CPUID emulation

The Xen emulation in KVM modifies certain CPUID leaves to expose
TSC information to the guest.

Previously, these CPUID leaves were updated whenever guest time changed,
but this conflicts with KVM_SET_CPUID/KVM_SET_CPUID2 ioctls which reject
changes to CPUID entries on running vCPUs.

Fix this by updating the TSC information directly in the CPUID emulation
handler instead of modifying the vCPU's CPUID entries.

Signed-off-by: Fred Griffoul <fgriffo@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Link: https://lore.kernel.org/r/20250124150539.69975-1-fgriffo@amazon.co.uk
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/cpuid.c
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h
arch/x86/kvm/xen.c
arch/x86/kvm/xen.h