summaryrefslogtreecommitdiffstats
path: root/arch/csky
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2023-09-15 15:54:30 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-06 14:57:00 +0200
commit733d7a5451fc648e3383162e1f7ae00d80ccd6d5 (patch)
tree7c93cd0bf3e3b554a2d462cd70a6edf6e41a29a8 /arch/csky
parente86a3a6226339367b24afacc8b0d530a1e7b2070 (diff)
downloadlinux-stable-733d7a5451fc648e3383162e1f7ae00d80ccd6d5.tar.gz
linux-stable-733d7a5451fc648e3383162e1f7ae00d80ccd6d5.tar.bz2
linux-stable-733d7a5451fc648e3383162e1f7ae00d80ccd6d5.zip
KVM: SVM: Fix TSC_AUX virtualization setup
commit e0096d01c4fcb8c96c05643cfc2c20ab78eae4da upstream. The checks for virtualizing TSC_AUX occur during the vCPU reset processing path. However, at the time of initial vCPU reset processing, when the vCPU is first created, not all of the guest CPUID information has been set. In this case the RDTSCP and RDPID feature support for the guest is not in place and so TSC_AUX virtualization is not established. This continues for each vCPU created for the guest. On the first boot of an AP, vCPU reset processing is executed as a result of an APIC INIT event, this time with all of the guest CPUID information set, resulting in TSC_AUX virtualization being enabled, but only for the APs. The BSP always sees a TSC_AUX value of 0 which probably went unnoticed because, at least for Linux, the BSP TSC_AUX value is 0. Move the TSC_AUX virtualization enablement out of the init_vmcb() path and into the vcpu_after_set_cpuid() path to allow for proper initialization of the support after the guest CPUID information has been set. With the TSC_AUX virtualization support now in the vcpu_set_after_cpuid() path, the intercepts must be either cleared or set based on the guest CPUID input. Fixes: 296d5a17e793 ("KVM: SEV-ES: Use V_TSC_AUX if available instead of RDTSC/MSR_TSC_AUX intercepts") Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Message-Id: <4137fbcb9008951ab5f0befa74a0399d2cce809a.1694811272.git.thomas.lendacky@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/csky')
0 files changed, 0 insertions, 0 deletions