linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Tom Lendacky <thomas.lendacky@amd.com>,
	Jim Mattson <jmattson@google.com>
Cc: Andy Lutomirski <luto@kernel.org>,
	Sean Christopherson <sean.j.christopherson@intel.com>,
	Joerg Roedel <joro@8bytes.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	X86 ML <x86@kernel.org>,
	"Chang S. Bae" <chang.seok.bae@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sasha Levin <sashal@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: FSGSBASE causing panic on 5.9-rc1
Date: Thu, 20 Aug 2020 13:07:36 -0700	[thread overview]
Message-ID: <c3170164-8b89-621e-59f8-999e4149e0a4@intel.com> (raw)
In-Reply-To: <e8b3f80e-3c5a-7a03-97f9-75cbdbbb023c@amd.com>

On 8/20/20 12:05 PM, Tom Lendacky wrote:
>> I added a quick hack to save TSC_AUX to a new variable in the SVM
>> struct and then restore it right after VMEXIT (just after where GS is
>> restored in svm_vcpu_enter_exit()) and my guest is no longer crashing.
> 
> Sorry, I mean my host is no longer crashing.

Just to make sure I've got this:
1. Older CPUs didn't have X86_FEATURE_RDPID
2. FSGSBASE patches started using RDPID in the NMI entry path when
   supported *AND* FSGSBASE was enabled
3. There was a latent SVM bug which did not restore the RDPID data
   before NMIs were reenabled after VMEXIT
4. If an NMI comes in the window between VMEXIT and the
   wrmsr(TSC_AUX)... boom

If FSGSBASE reverted is disabled (as Tom did on the command-line), then
the RDPID path isn't hit.

Fun.

  reply	other threads:[~2020-08-20 20:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 18:07 FSGSBASE causing panic on 5.9-rc1 Tom Lendacky
2020-08-19 18:19 ` Tom Lendacky
2020-08-19 21:25   ` Andy Lutomirski
2020-08-20  0:21     ` Andy Lutomirski
2020-08-20 15:10       ` Sean Christopherson
2020-08-20 15:21         ` Tom Lendacky
2020-08-20 15:55           ` Andy Lutomirski
2020-08-20 16:17             ` Tom Lendacky
2020-08-20 16:30               ` Tom Lendacky
2020-08-20 17:41                 ` Paolo Bonzini
2020-08-20 18:34                 ` Tom Lendacky
2020-08-20 18:38                   ` Jim Mattson
2020-08-20 18:39                     ` Jim Mattson
2020-08-20 18:41                       ` Tom Lendacky
2020-08-20 19:04                         ` Tom Lendacky
2020-08-20 19:05                           ` Tom Lendacky
2020-08-20 20:07                             ` Dave Hansen [this message]
2020-08-20 20:15                               ` Tom Lendacky
2020-08-20 20:36                                 ` Andy Lutomirski
2020-08-20 22:05                                   ` Sean Christopherson
2020-08-20 22:07                                     ` Andy Lutomirski
2020-08-20 22:34                                       ` Sean Christopherson
2020-08-21  0:00                                         ` Tom Lendacky
2020-08-21  1:56                                           ` Sean Christopherson
2020-08-20 18:43           ` Bae, Chang Seok
2020-08-20 13:43     ` Paolo Bonzini
2020-08-20 17:51       ` Andy Lutomirski

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=c3170164-8b89-621e-59f8-999e4149e0a4@intel.com \
    --to=dave.hansen@intel.com \
    --cc=bp@alien8.de \
    --cc=chang.seok.bae@intel.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.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;
as well as URLs for NNTP newsgroup(s).