From: Sean Christopherson <seanjc@google.com>
To: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
Cc: x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Borislav Petkov <bp@alien8.de>,
linux-kernel@vger.kernel.org,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Tom Lendacky <thomas.lendacky@amd.com>
Subject: Re: [PATCH v3 0/3] x86/crash: Fix double NMI shootdown bug
Date: Tue, 15 Nov 2022 19:36:20 +0000 [thread overview]
Message-ID: <Y3PqNLW48pXaWRyA@google.com> (raw)
In-Reply-To: <abf9feef-443f-fcfa-952c-0123e61b280d@igalia.com>
On Tue, Nov 15, 2022, Guilherme G. Piccoli wrote:
> On 14/11/2022 20:34, Sean Christopherson wrote:
> > [...]
> > v3:
> > - Re-collect Guilherme's Tested-by.
> > - Tweak comment in patch 1 to reference STGI instead of CLGI.
> > - Celebrate this series' half-birthday.
>
> Heheh
>
> Thanks a lot for persisting with this Sean, much appreciated! I'm
> surprised on how long is taking to get these _fixes_ merged in the
> kernel, hence your effort is very valuable =)
Well, to be fair, the fixes aren't perfect. Aside from the GIF thing, patch 2
breaks CONFIG_SMP=n.
I think there's another bug lurking too. The emergency reboot path doesn't
VMCLEAR VMCSes. AFAIK, Intel doesn't guarantee the VMCS caches are purged on
INIT, so if the reboot doesn't actually RESET CPUs, the new kernel could observe
memory corruption due to an old VMCS getting written back.
Argh, and I missed sysvec_reboot() + smp_stop_nmi_callback() for SVM support.
And slightly longer term, this entire mess can be cleaned up. Once KVM's handling
of VMX/SVM initialization sucks less[*], all of the disabling logic can be moved
into KVM callbacks and the kernel can stop speculatively trying to disable VMX/SVM.
I'll send a v4 to fix all of the suspected bugs, and then work on another series to
clean up the callbacks, which will have dependencies on both the kvm_init() rework
and this series.
[*] https://lore.kernel.org/all/20221102231911.3107438-1-seanjc@google.com
prev parent reply other threads:[~2022-11-15 19:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 23:34 [PATCH v3 0/3] x86/crash: Fix double NMI shootdown bug Sean Christopherson
2022-11-14 23:34 ` [PATCH v3 1/3] x86/crash: Disable virt in core NMI crash handler to avoid double shootdown Sean Christopherson
2022-11-14 23:34 ` [PATCH v3 2/3] x86/reboot: Disable virtualization in an emergency if SVM is supported Sean Christopherson
2022-11-14 23:34 ` [PATCH v3 3/3] x86/virt: Fold __cpu_emergency_vmxoff() into its sole caller Sean Christopherson
2022-11-15 0:32 ` [PATCH v3 0/3] x86/crash: Fix double NMI shootdown bug Andrew Cooper
2022-11-15 16:56 ` Sean Christopherson
2022-11-15 18:34 ` Tom Lendacky
2022-11-15 19:58 ` Andrew Cooper
2022-11-15 15:33 ` Guilherme G. Piccoli
2022-11-15 19:36 ` Sean Christopherson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3PqNLW48pXaWRyA@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=gpiccoli@igalia.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=vkuznets@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox