Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1446784ybe; Wed, 11 Sep 2019 15:22:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2Ix01j1wT/TOEsGFtygKrvSKAoOrbWOuQa00mEX03LZa8ZuN4l4paGdLpR93mXBW4HTxk X-Received: by 2002:a50:b501:: with SMTP id y1mr38615402edd.167.1568240520948; Wed, 11 Sep 2019 15:22:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568240520; cv=none; d=google.com; s=arc-20160816; b=cSxRKWp3egbXs6XZ7kcfghf0HqbgdI94XqV59DJ8ELuyYN2r7iAgUxMDavqWtHW4DZ JbnNEVfi9PDG0gIwYA0NqrVEVW/Sci6MfSR2Q9S8RQ67xOeAa6hdNROJZlpGJoR9QGdz 2x+zJ8ojdMjUikNRKtXVlaBurQgCxbhkb9zlAp92mLW4vO+NzwK5GHGevGq3NAHXYlTO DJsA8ICCm4zBx6Ib6NBt8aIhbUSDGWOaj3+CaF+havr8wIGnjw8MM29w90gFKx12DsW+ Lbf6owDrAIBZeMOdCzCN8zXSPL5YE4CJFjO94R6/wpaaOzBrerkO/EAHiL0ekgph5s3Y 35gA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=gtcwS9p/lCZvEnq0NJm57bRs+TAdtJxfqh5Y2jFzaRw=; b=I96wf7ZZddOBF7lmncw6vtpZvBXxitwr+ua0vhuIMrFhG0ibcCfc8v8ETNksXQeN+3 7HKNXX5D+k1mpUqe4Cgse8Cega/N49X1Sq6smugpBb/qtfsgxU3GK8oluAez01VXBxqC w0Nvxhiu2EAOFTUVWLaCGwczqyBeTwRhsVeuvh003rWsB00jmkugjFCF6DUFQSU24J83 amANQdUA7QphkpBMbM65X2R0W7rPXSLk3cBoCB5iUZ9ktVVR0R8aLJcJnsYrsSM3G8Os el/hUkV4RdI7JpFzhEdbp4sZl9nVuaLzFwWhNUrdtEHRcSoEanei7foOn+4jZqvPcX/K MeUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id y16si9628213eje.248.2019.09.11.15.21.37; Wed, 11 Sep 2019 15:22:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730401AbfIKTyB (ORCPT + 99 others); Wed, 11 Sep 2019 15:54:01 -0400 Received: from mga07.intel.com ([134.134.136.100]:63887 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727581AbfIKTyB (ORCPT ); Wed, 11 Sep 2019 15:54:01 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2019 12:54:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,494,1559545200"; d="scan'208";a="184583231" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.41]) by fmsmga008.fm.intel.com with ESMTP; 11 Sep 2019 12:53:58 -0700 Date: Wed, 11 Sep 2019 12:53:59 -0700 From: Sean Christopherson To: Paolo Bonzini Cc: Jan Dakinevich , "linux-kernel@vger.kernel.org" , Denis Lunev , Roman Kagan , Denis Plotnikov , Radim =?utf-8?B?S3LEjW3DocWZ?= , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "x86@kernel.org" , "kvm@vger.kernel.org" Subject: Re: [PATCH 0/3] fix emulation error on Windows bootup Message-ID: <20190911195359.GK1045@linux.intel.com> References: <1566911210-30059-1-git-send-email-jan.dakinevich@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed, Sep 11, 2019 at 05:51:05PM +0200, Paolo Bonzini wrote: > On 27/08/19 15:07, Jan Dakinevich wrote: > > This series intended to fix (again) a bug that was a subject of the > > following change: > > > > 6ea6e84 ("KVM: x86: inject exceptions produced by x86_decode_insn") > > > > Suddenly, that fix had a couple mistakes. First, ctxt->have_exception was > > not set if fault happened during instruction decoding. Second, returning > > value of inject_emulated_instruction was used to make the decision to > > reenter guest, but this could happen iff on nested page fault, that is not > > the scope where this bug could occur. > > > > However, I have still deep doubts about 3rd commit in the series. Could > > you please, make me an advise if it is the correct handling of guest page > > fault? > > > > Jan Dakinevich (3): > > KVM: x86: fix wrong return code > > KVM: x86: set ctxt->have_exception in x86_decode_insn() > > KVM: x86: always stop emulation on page fault > > > > arch/x86/kvm/emulate.c | 4 +++- > > arch/x86/kvm/x86.c | 4 +++- > > 2 files changed, 6 insertions(+), 2 deletions(-) > > > > Queued, thanks. I added the WARN_ON_ONCE that Sean suggested. Which version did you queue? It sounds like you queued v1, which breaks VMware backdoor emulation due to incorrect patch ordering. v3[*] fixes the ordering issue and adds the WARN_ON_ONCE. [*] https://patchwork.kernel.org/cover/11120627/