Skip to content

Commit 9a12fa5

Browse files
Tina Zhangbonzini
authored andcommitted
KVM: SVM: Disable AVIC IPI virtualization on Hygon Family 18h (erratum #1235)
Hygon Family 18h CPUs are derived from AMD Family 17h (Zen1) silicon and share the same erratum #1235: hardware may read a stale IsRunning=1 bit during ICR write emulation and silently fail to generate an AVIC_IPI_FAILURE_TARGET_NOT_RUNNING VM-Exit on the sending vCPU. The absence of the VM-Exit causes KVM to miss the required wakeup of blocking target vCPUs, leading to hung vCPUs and unbounded delays in guest execution. Extend the existing AMD Family 17h erratum #1235 workaround to also cover Hygon Family 18h. With IPI virtualization disabled, KVM never sets IsRunning=1 in the Physical ID table, so every non-self IPI generates a VM-Exit and is correctly emulated. Fixes: 8de4a1c ("KVM: SVM: Disable (x2)AVIC IPI virtualization if CPU has erratum #1235") Cc: <stable@vger.kernel.org> Signed-off-by: Tina Zhang <zhang_wei@open-hieco.net> Message-ID: <20260522040014.3380201-1-zhang_wei@open-hieco.net>
1 parent d9c41dc commit 9a12fa5

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

arch/x86/kvm/svm/avic.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,12 +1300,14 @@ bool __init avic_hardware_setup(void)
13001300
}
13011301

13021302
/*
1303-
* Disable IPI virtualization for AMD Family 17h CPUs (Zen1 and Zen2)
1304-
* due to erratum 1235, which results in missed VM-Exits on the sender
1305-
* and thus missed wake events for blocking vCPUs due to the CPU
1306-
* failing to see a software update to clear IsRunning.
1303+
* Disable IPI virtualization for AMD Family 17h (Zen1 and Zen2) and
1304+
* Hygon Family 18h (derived from AMD Zen1) CPUs due to erratum 1235,
1305+
* which results in missed VM-Exits on the sender and thus missed wake
1306+
* events for blocking vCPUs due to the CPU failing to see a software
1307+
* update to clear IsRunning.
13071308
*/
1308-
enable_ipiv = enable_ipiv && boot_cpu_data.x86 != 0x17;
1309+
if (boot_cpu_data.x86 == 0x17 || boot_cpu_data.x86 == 0x18)
1310+
enable_ipiv = false;
13091311

13101312
amd_iommu_register_ga_log_notifier(&avic_ga_log_notifier);
13111313

0 commit comments

Comments
 (0)