Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1417059ybj; Tue, 5 May 2020 20:37:55 -0700 (PDT) X-Google-Smtp-Source: APiQypI2mJ481hjeu+oOJgKFm3GjY1VsYjN6i5IKOc1jxWW7jer1FWYZerxj1MIQYvZ+ODM8JBTS X-Received: by 2002:a17:906:68d7:: with SMTP id y23mr5789550ejr.85.1588736274825; Tue, 05 May 2020 20:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588736274; cv=none; d=google.com; s=arc-20160816; b=cAAk8gGB8/vwPUvrfF/eBLDLL2DYL2u0YowDTn0t3SJxKOq9bKnaRFWeL/riqscY47 1tAoTlQwxOoTwMZk0ubRFbzsQpDr23ro2UzD42USyWWbSjRvjlB7NJDpZpD43KOkKW49 y8gkzGtDfu6Uql0Gfe27aBvjAah3VlGyf7Ocjuc3gmz4qvxQ8cNdaRndJkv/kjmwEK6e XP8MT96U5nmF1QVRXU2VKBGDDnhfInJdV/UeXShyc++H1eIZMazlhJ/VzfnWYq5OKHng 0uyI1YPkqj2u4GIv8TVh6kQ1MqRn+Dj79yQoRlGc3z92MLkTysLGoaQ+DFa9wDnmtvAc am0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=kRgVLgOwFu3Hns08ui6iAa/paiwcrpDt5OQ+rKsS/tQ=; b=z89RPWi9n827nqqtrR3tw19bcjgagLVmIyP5xQcLY7VfPbMjv5NqCnymLv/kcfBSAc skYfS2Kz0hvJuQib70XARc7c7CkT+s4jWTKyKjD59i2O0U/V707z7bHmSG81t1D3HNOa CWpaeo6lDvIW77NQcVN4G/Nt68oD7y8TZalWMhs7/7EgAV2FWD0T4n+WQw68aO9PW2tt ne6tKzfEi+7XosF4cz0NNsxHvaOq8iX6TA/AD5aW5aaU2D54rtqYXsMBj8Exm/5thB9K aLlJaVXuFzS6mvNcOrxCM5485xEdpDZsjUw0Eap2MfLZaGTCwgFcyZpRlvw6mmr8QB+T 3cmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si339174ede.225.2020.05.05.20.37.32; Tue, 05 May 2020 20:37:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726825AbgEFDcx (ORCPT + 99 others); Tue, 5 May 2020 23:32:53 -0400 Received: from mga07.intel.com ([134.134.136.100]:40353 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbgEFDcw (ORCPT ); Tue, 5 May 2020 23:32:52 -0400 IronPort-SDR: fJ+/Q/M08uUGj3XW3VdUoFAAM4zL4I/MeLNmb4gXjIVZYHdY0PXOo8zHR8z6PwQ0r9w0yxyu68 nG3tiLIRv5yg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 20:32:48 -0700 IronPort-SDR: i0SZQFsQQNsDLmf/ER3DwkHH+b5tObGvFaY0MHHfkFkRX3rLDsrBiX44lKp89GaRoaaPQSNa1m TvYSGdqpT/eA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,357,1583222400"; d="scan'208";a="259972212" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by orsmga003.jf.intel.com with ESMTP; 05 May 2020 20:32:48 -0700 Date: Tue, 5 May 2020 20:32:48 -0700 From: Sean Christopherson To: Qian Cai Cc: Paolo Bonzini , KVM , LKML Subject: Re: Intel KVM entry failed, hardware error 0x0 Message-ID: <20200506033247.GC19271@linux.intel.com> References: <014D7571-6281-457C-9CF3-693809E9F651@lca.pw> <20200506030014.GB19271@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200506030014.GB19271@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 05, 2020 at 08:00:15PM -0700, Sean Christopherson wrote: > On Tue, May 05, 2020 at 10:32:15PM -0400, Qian Cai wrote: > > Today’s linux-next started to fail with this config, > > > > https://raw.githubusercontent.com/cailca/linux-mm/master/kcsan.config > > > > qemu-kvm-2.12.0-99.module+el8.2.0+5827+8c39933c.x86_64 > > > > I believe it was working yesterday. Before I bury myself bisecting it, does > > anyone have any thought? > > It reproduces for me as well with my vanilla config in a VM. I can debug > and/or bisect, should be quite quick in a VM. > > VM is bailing on the EPT Violation at the reset vector, i.e. on the very > first exit. Presumably KVM is incorrectly setting vmx->fail somewhere. The __FILL_RETURN_BUFFER in the VM-Exit path was recently modified and changed how it clobbered EFLAGS, which causes KVM to think VM-Enter failed. Commit 089dd8e53126 ("x86/speculation: Change FILL_RETURN_BUFFER to work with objtool") introduced the change, but this is really a bug in KVM. The VM-Exit path shouldn't rely on __FILL_RETURN_BUFFER to set EFLAGS to a specific state, i.e. EFLAGS was always being clobbered, it just happened to work before now. I'll get a patch sent out shortly.