* Re: [PATCH] KVM: x86: Clear CR3[63:32] on SMM entry from long mode [not found] <20260928-kvm-smm-cr3-upper-bits-v1-1-138f52dd531e@gmail.com> @ 2026-09-28 7:25 ` Qiliang Yuan 2026-09-28 17:42 ` Wei Liu 0 siblings, 1 reply; 5+ messages in thread From: Qiliang Yuan @ 2026-09-28 7:25 UTC (permalink / raw) To: Sean Christopherson, Paolo Bonzini Cc: Qiliang Yuan, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, kvm, linux-kernel, Vitaly Kuznetsov, K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui, Long Li, linux-hyperv +Cc Hyper-V folks and linux-hyperv, since the failure is triggered by Hyper-V's handling of VMRUN for a nested (L1) hypervisor, i.e. KVM running on WSL2. For the Hyper-V side: the VMRUN is rejected when the guest state has CR0.PG=0, EFER.LMA=0 and CR3[63:32] != 0, a combination that bare-metal SVM does not reject. Is that check intentional? If it is not, a Hyper-V fix would help older KVM versions as well; either way the patch avoids creating that state in the first place. The full patch is here: https://lore.kernel.org/r/20260928-kvm-smm-cr3-upper-bits-v1-1-138f52dd531e@gmail.com Thanks, Qiliang ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: x86: Clear CR3[63:32] on SMM entry from long mode 2026-09-28 7:25 ` [PATCH] KVM: x86: Clear CR3[63:32] on SMM entry from long mode Qiliang Yuan @ 2026-09-28 17:42 ` Wei Liu 2026-09-28 18:19 ` Sean Christopherson 0 siblings, 1 reply; 5+ messages in thread From: Wei Liu @ 2026-09-28 17:42 UTC (permalink / raw) To: Qiliang Yuan Cc: Sean Christopherson, Paolo Bonzini, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, kvm, linux-kernel, Vitaly Kuznetsov, K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui, Long Li, linux-hyperv Hi Qiliang On Mon, Sep 28, 2026 at 03:25:34PM +0800, Qiliang Yuan wrote: > +Cc Hyper-V folks and linux-hyperv, since the failure is triggered by > Hyper-V's handling of VMRUN for a nested (L1) hypervisor, i.e. KVM > running on WSL2. > > For the Hyper-V side: the VMRUN is rejected when the guest state has > CR0.PG=0, EFER.LMA=0 and CR3[63:32] != 0, a combination that bare-metal > SVM does not reject. Is that check intentional? If it is not, a > Hyper-V fix would help older KVM versions as well; either way the patch > avoids creating that state in the first place. > > The full patch is here: > https://lore.kernel.org/r/20260928-kvm-smm-cr3-upper-bits-v1-1-138f52dd531e@gmail.com Please share the Windows version from `winver`. My colleague said that it had been fixed. Maybe the change needs to be ported. Thanks, Wei > > Thanks, > Qiliang ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: x86: Clear CR3[63:32] on SMM entry from long mode 2026-09-28 17:42 ` Wei Liu @ 2026-09-28 18:19 ` Sean Christopherson 2026-09-29 0:57 ` Qiliang Yuan 0 siblings, 1 reply; 5+ messages in thread From: Sean Christopherson @ 2026-09-28 18:19 UTC (permalink / raw) To: Wei Liu Cc: Qiliang Yuan, Paolo Bonzini, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, kvm, linux-kernel, Vitaly Kuznetsov, K. Y. Srinivasan, Haiyang Zhang, Dexuan Cui, Long Li, linux-hyperv On Mon, Sep 28, 2026, Wei Liu wrote: > Hi Qiliang > > On Mon, Sep 28, 2026 at 03:25:34PM +0800, Qiliang Yuan wrote: > > +Cc Hyper-V folks and linux-hyperv, since the failure is triggered by > > Hyper-V's handling of VMRUN for a nested (L1) hypervisor, i.e. KVM > > running on WSL2. > > > > For the Hyper-V side: the VMRUN is rejected when the guest state has > > CR0.PG=0, EFER.LMA=0 and CR3[63:32] != 0, a combination that bare-metal > > SVM does not reject. Is that check intentional? If it is not, a > > Hyper-V fix would help older KVM versions as well; either way the patch > > avoids creating that state in the first place. > > > > The full patch is here: > > https://lore.kernel.org/r/20260928-kvm-smm-cr3-upper-bits-v1-1-138f52dd531e@gmail.com > > Please share the Windows version from `winver`. > > My colleague said that it had been fixed. Maybe the change needs to be ported. Ya, I'd much prefer to get this fixed in Hyper-V. If we need to carry a KVM hack, then at the very least it should be limited to when KVM detects that it's running on Hyper-V. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: x86: Clear CR3[63:32] on SMM entry from long mode 2026-09-28 18:19 ` Sean Christopherson @ 2026-09-29 0:57 ` Qiliang Yuan 2026-09-30 1:42 ` Wei Liu 0 siblings, 1 reply; 5+ messages in thread From: Qiliang Yuan @ 2026-09-29 0:57 UTC (permalink / raw) To: Wei Liu Cc: Qiliang Yuan, Sean Christopherson, Paolo Bonzini, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, kvm, linux-kernel, Vitaly Kuznetsov, K. Y. Srinivasan, Haiyang Zhang, Dexuan Cui, Long Li, linux-hyperv On Mon, Sep 28, 2026 at 10:42:43AM -0700, Wei Liu wrote: > Please share the Windows version from `winver`. > > My colleague said that it had been fixed. Maybe the change needs to be ported. Windows 11 Pro, version 25H2, OS build 26200.9457, with WSL 2.9.3.0. The host CPU is an AMD Ryzen 9 7940HX. This machine is fully up to date through Windows Update, and the failure reproduces on this build, so the fix does not seem to have reached the released builds yet. Which build or channel (e.g. Insider) carries it? I am happy to test it. I have also filed it as a WSL issue, with repro steps and the SMRAM analysis: https://github.com/microsoft/WSL/issues/41709 On Mon, Sep 28, 2026 at 11:19:21AM -0700, Sean Christopherson wrote: > Ya, I'd much prefer to get this fixed in Hyper-V. If we need to carry a KVM hack, > then at the very least it should be limited to when KVM detects that it's running > on Hyper-V. Understood, a Hyper-V fix is the right answer. Since current released builds are affected, I can send a v2 that applies the workaround only when KVM is running on Hyper-V, if you'd take that in the meantime. Otherwise I'll drop this and wait for the Hyper-V fix to ship. Thanks, Qiliang ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: x86: Clear CR3[63:32] on SMM entry from long mode 2026-09-29 0:57 ` Qiliang Yuan @ 2026-09-30 1:42 ` Wei Liu 0 siblings, 0 replies; 5+ messages in thread From: Wei Liu @ 2026-09-30 1:42 UTC (permalink / raw) To: Qiliang Yuan Cc: Wei Liu, Sean Christopherson, Paolo Bonzini, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, kvm, linux-kernel, Vitaly Kuznetsov, K. Y. Srinivasan, Haiyang Zhang, Dexuan Cui, Long Li, linux-hyperv On Tue, Sep 29, 2026 at 08:57:55AM +0800, Qiliang Yuan wrote: > On Mon, Sep 28, 2026 at 10:42:43AM -0700, Wei Liu wrote: > > Please share the Windows version from `winver`. > > > > My colleague said that it had been fixed. Maybe the change needs to be ported. > > Windows 11 Pro, version 25H2, OS build 26200.9457, with WSL 2.9.3.0. > The host CPU is an AMD Ryzen 9 7940HX. > > This machine is fully up to date through Windows Update, and the failure > reproduces on this build, so the fix does not seem to have reached the > released builds yet. Which build or channel (e.g. Insider) carries it? > I am happy to test it. Windows 11 Pro, version 26H1 should have the fix. Wei > > I have also filed it as a WSL issue, with repro steps and the SMRAM > analysis: https://github.com/microsoft/WSL/issues/41709 > > On Mon, Sep 28, 2026 at 11:19:21AM -0700, Sean Christopherson wrote: > > Ya, I'd much prefer to get this fixed in Hyper-V. If we need to carry a KVM hack, > > then at the very least it should be limited to when KVM detects that it's running > > on Hyper-V. > > Understood, a Hyper-V fix is the right answer. Since current released > builds are affected, I can send a v2 that applies the workaround only > when KVM is running on Hyper-V, if you'd take that in the meantime. > Otherwise I'll drop this and wait for the Hyper-V fix to ship. > > Thanks, > Qiliang ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-30 1:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260928-kvm-smm-cr3-upper-bits-v1-1-138f52dd531e@gmail.com>
2026-09-28 7:25 ` [PATCH] KVM: x86: Clear CR3[63:32] on SMM entry from long mode Qiliang Yuan
2026-09-28 17:42 ` Wei Liu
2026-09-28 18:19 ` Sean Christopherson
2026-09-29 0:57 ` Qiliang Yuan
2026-09-30 1:42 ` Wei Liu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox