From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F8D4C31E46 for ; Wed, 12 Jun 2019 20:54:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6586B208C2 for ; Wed, 12 Jun 2019 20:54:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389105AbfFLUyd (ORCPT ); Wed, 12 Jun 2019 16:54:33 -0400 Received: from mga01.intel.com ([192.55.52.88]:36792 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728350AbfFLUyd (ORCPT ); Wed, 12 Jun 2019 16:54:33 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jun 2019 13:54:31 -0700 X-ExtLoop1: 1 Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.36]) by fmsmga006.fm.intel.com with ESMTP; 12 Jun 2019 13:54:30 -0700 Date: Wed, 12 Jun 2019 13:54:30 -0700 From: Sean Christopherson To: Borislav Petkov Cc: George Kennedy , joro@8bytes.org, pbonzini@redhat.com, mingo@redhat.com, hpa@zytor.com, kvm@vger.kernel.org, syzkaller@googlegroups.com Subject: Re: kernel BUG at arch/x86/kvm/x86.c:361! on AMD CPU Message-ID: <20190612205430.GA26320@linux.intel.com> References: <37952f51-7687-672c-45d9-92ba418c9133@oracle.com> <20190612161255.GN32652@zn.tnic> <20190612195152.GQ32652@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190612195152.GQ32652@zn.tnic> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, Jun 12, 2019 at 09:51:52PM +0200, Borislav Petkov wrote: > On Wed, Jun 12, 2019 at 02:45:34PM -0400, George Kennedy wrote: > > The crash can still be reproduced with VM running Upstream 5.2.0-rc4 > > That's clear. > > > and host running Ubuntu on AMD CPU. > > That's the important question: why can't I trigger it with 5.2.0-rc4+ as > the host and you can with the ubuntu kernel 4.15 or so. I.e., what changed > upstream or does the ubuntu kernel have out-of-tree stuff? > > Maybe kvm folks would have a better idea. That kvm_spurious_fault thing > is for: > > /* > * Hardware virtualization extension instructions may fault if a > * reboot turns off virtualization while processes are running. > * Trap the fault and ignore the instruction if that happens. > */ > asmlinkage void kvm_spurious_fault(void); > > but you're not rebooting... The reboot thing is a red-herring. The ____kvm_handle_fault_on_reboot() macro suppresses faults that occur on VMX and SVM instructions while the kernel is rebooting (CPUs need to leave VMX/SVM mode to recognize INIT), i.e. kvm_spurious_fault() is reached when a VMX or SVM instruction faults and we're *not* rebooting. TL;DR: an SVM instruction is faulting unexpectedly.