From: Sean Christopherson <seanjc@google.com>
To: Brian Cowan <brcowan@gmail.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: A really weird guest crash, that ONLY happens on KVM, and ONLY on 6th gen+ Intel Core CPU's
Date: Fri, 20 May 2022 15:22:46 +0000 [thread overview]
Message-ID: <YoeyRibqS3dzvku6@google.com> (raw)
In-Reply-To: <CAPUGS=pK57C+yb7Pr5o-LFBWHE-jP8+6-zSrigxVm=hcOtqi=g@mail.gmail.com>
On Fri, May 20, 2022, Brian Cowan wrote:
> Disabling smap seems to fix the problem...
Mwhahaha, I should have found someone to bet me real money :-)
> Now for the hard question: WHY?
The most likely scenario it that there's a SMAP violation (#PF due to a kernel
access to user data without an override to tell the CPU that the access is intentional)
somewhere in the guest that crashes/panics the guest kernel. Assuming that's the
case, there are three-ish possibilities:
1. There's a bug your company's custom kernel driver.
2. There's a SMAP violation somewhere else in RHEL 7.8, which is an 8+ year old
frankenkernel...
3. There's a bug in your version of KVM related to SMAP virtualization
#3 begs the question, does this fail on bare metal that supports SMAP? If so,
then that rules out #3.
If the crash occurs only when doing stuff related to your custom driver, #1 is
most likely the culprit.
One way to try and debug further would be to disable EPT in KVM (load kvm_intel with
ept=0) and then use KVM tracepoints to see when the guest dies. If it's a SMAP
violation, there should be an injected SMAP #PF shortly before the guest dies.
next prev parent reply other threads:[~2022-05-20 15:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 17:12 A really weird guest crash, that ONLY happens on KVM, and ONLY on 6th gen+ Intel Core CPU's Brian Cowan
2022-05-18 17:30 ` Jim Mattson
2022-05-18 18:49 ` Brian Cowan
2022-05-18 21:27 ` Jim Mattson
2022-05-18 21:26 ` Sean Christopherson
2022-05-20 14:53 ` Brian Cowan
2022-05-20 15:22 ` Sean Christopherson [this message]
2022-05-20 22:03 ` Brian Cowan
2022-05-20 23:09 ` Jim Mattson
2022-05-24 15:30 ` Brian Cowan
2022-05-25 19:57 ` Brian Cowan
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=YoeyRibqS3dzvku6@google.com \
--to=seanjc@google.com \
--cc=brcowan@gmail.com \
--cc=kvm@vger.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