[Devel] [PATCH VHS7 00/11] RFC: fix L2 hang on SVM with fresh L1 kernels

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jul 1 17:58:33 MSK 2022


The patchset has been applied to branch-rh7-3.10.0-1160.66.1.vz7.188.x-ovz branch,
will appear in 3.10.0-1160.66.1.vz7.188.2 kernel.

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 23.06.2022 12:55, Alexander Mikhalitsyn wrote:
> We noticed, that on new AMD Rome and AMD Milan processors L2
> VM getting hang.
> 
> We have checked that this happens for both:
> - AMD EPYC 7261 (Rome)
> - AMD EPYC 7443P (Milan)
> 
> but Intel (VMX) is not affected.
> 
> Another key observation here is that L2 hang happens not in all
> cases, but only when L1 kernel is "sufficiently new".
> 
> Example:
> 
> VHS 7 (host) -> CentOS 8 (L1) -> CentOS 8 (L2)    HANG
> VHS 7 (host) -> CentOS 7 (L1) -> CentOS 7 (L2)    WORKS
> CentOS 8 (host) -> CentOS 8 (L1) -> CentOS 8 (L2) WORKS
> 
> After bisecting L1 kernel it was found that problem is introduced by commit:
> c9d40913ac5 ("KVM: x86: enable event window in inject_pending_event")
> 
> I've tried to revert this commit for L1 kernel and it started work!
> 
> Of course, this is not a solution, and I decided to port this commit for L0
> kernel (which is RHEL 7 based for VHS 7) with hope that it helps.
> 
> This is first attempt to port desired commit. I've tried to take as few
> commits as possible.
> 
> https://jira.sw.ru/browse/PSBM-139278
> 
> Liran Alon (1):
>    KVM: nVMX: Require immediate-exit when event reinjected to L2 and L1
>      event pending
> 
> Paolo Bonzini (8):
>    KVM: nSVM: implement check_nested_events for interrupts
>    KVM: SVM: introduce nested_run_pending
>    KVM: nSVM: Report NMIs as allowed when in L2 and Exit-on-NMI is set
>    KVM: SVM: Split out architectural interrupt/NMI/SMI blocking checks
>    KVM: x86: replace is_smm checks with kvm_x86_ops.smi_allowed
>    KVM: x86: Replace late check_nested_events() hack with more precise
>      fix
>    KVM: x86: track manually whether an event has been injected
>    KVM: x86: enable event window in inject_pending_event
> 
> Sean Christopherson (1):
>    KVM: nVMX: Properly handle userspace interrupt window request
> 
> ZhuangYanying (1):
>    KVM: x86: Fix nmi injection failure when vcpu got blocked
> 
>   arch/x86/include/asm/kvm_host.h |  10 +-
>   arch/x86/kvm/mmu.c              |   2 +-
>   arch/x86/kvm/svm.c              | 155 +++++++++++++++++++++----------
>   arch/x86/kvm/vmx.c              |  61 +++++++------
>   arch/x86/kvm/x86.c              | 157 ++++++++++++++++++--------------
>   5 files changed, 238 insertions(+), 147 deletions(-)
> 


More information about the Devel mailing list