summaryrefslogtreecommitdiff
path: root/drivers/genpd/imx/gpc.c
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2023-09-15 23:54:30 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2023-09-23 12:35:49 +0300
commite0096d01c4fcb8c96c05643cfc2c20ab78eae4da (patch)
treeda971d11ca868c738db790a4f2f1a6fe6a025172 /drivers/genpd/imx/gpc.c
parente8d93d5d93f85949e7299be289c6e7e1154b2f78 (diff)
downloadlinux-e0096d01c4fcb8c96c05643cfc2c20ab78eae4da.tar.xz
KVM: SVM: Fix TSC_AUX virtualization setup
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>
Diffstat (limited to 'drivers/genpd/imx/gpc.c')
0 files changed, 0 insertions, 0 deletions