Bug 217796
Summary: | latest Zen Inception fixes breaks nested kvm virtualization on AMD | ||
---|---|---|---|
Product: | Virtualization | Reporter: | sonst+kernel |
Component: | kvm | Assignee: | virtualization_kvm |
Status: | NEW --- | ||
Severity: | blocking | CC: | carnil, seanjc |
Priority: | P3 | ||
Hardware: | AMD | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: |
Description
sonst+kernel
2023-08-15 14:55:21 UTC
Note, adding spec_rstack_overflow=off as a kernel command line makes nested VM boot properly again without problems: https://bugs.archlinux.org/task/79384 So, spec_rstack_overflow=safe-ret is breaking nested KVM virtualization. This is going to sound completely ridiculous, but can you try the fix for the guest RFLAGS corruption issue in the return thunk? It's definitely unlikely that the _only_ symptom is an unexpected OOM, but it's theoretically possible, e.g. if your setup only triggers KVM (bare metal host) emulation in a handful of flows, and one of those flows just happens to send a single Jcc in the wrong direction. https://lore.kernel.org/all/20230811155255.250835-1-seanjc@google.com Sean, it does sound ridiculous, but it isn't. I tested the fix you suggested and it works now with that patch applied. In the meantime i switched to a differnet machine to be able to test your fix and there I could also confirm the problem there on a 6.4.11 kernel: Test machine setup: Gentoo, (vanilla) Kernel 6.4.11 Without the patch and spec_rstack_overflow in the default meaning pec_rstack_overflow=safe-ret also on this system my nested VMs do not start and get OOM-killed. I then applied the patch from your link, Sean, and it works now. Cheers, Oliver |