From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66F8E13BAFA for ; Thu, 23 May 2024 11:54:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716465299; cv=none; b=tpubaVYRJh8oxn0LNDxzbnkE+LwDNcyS519x5sNOAXse2Qv4O6MIOV7GGC0ZP0Rb2GZ069nDl6WG+UBldd2cRsUUm3XV/QeWO/WCtFXH8i3KK0CkaS2HS+bGWnHfjOc/sbbVtgaKnhGc5ZI+eiNDJSXjkqLQLNLjRDMpxcMKH1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716465299; c=relaxed/simple; bh=o/p6hcHqbfbXYBZHTVEOA7+AOdESDvvQ5NesMEcReek=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QJ3nSMCOBq+UtHKjCsKe2mZJwr1uW/7REvHO7oGHvth0OToGqgsZwPQGlDuvh+hpuOqcR4jInvFJaIE/0LZQPqQZ4458+VhtUbcJNe7I4Do+jqLyBArqAfuIMfDtZ8tbX99i5uuOy5jar15W77UrDi9LDfGs6Q8u3M326IBKc3M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GsfsBe75; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="GsfsBe75" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88AE6C2BD10; Thu, 23 May 2024 11:54:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716465298; bh=o/p6hcHqbfbXYBZHTVEOA7+AOdESDvvQ5NesMEcReek=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GsfsBe75Rm97u8SbhxaFOi53icvNi9WXfzHTMPUQhSgZwIlSKjg3OKH1tp4y0TuHZ WcVdUjJxW5/KByZgUeNgKATjSdyA+MREP8cyNzFCd29ew1zya5BWVYAsIahrk0mVSO 3/7jouEVIXBUM8o5g91qVWahvmGSW3/1jucNQJck= Date: Thu, 23 May 2024 13:54:56 +0200 From: Greg KH To: Sean Christopherson Cc: Nicolas Saenz Julienne , stable@vger.kernel.org, Maxim Levitsky , Paolo Bonzini Subject: Re: [PATCH 5.10.y] KVM: x86: Clear "has_error_code", not "error_code", for RM exception injection Message-ID: <2024052348-overhung-sulfite-caec@gregkh> References: <2023041135-yippee-shabby-b9ad@gregkh> <20240510131213.21633-1-nsaenz@amazon.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, May 10, 2024 at 08:42:52AM -0700, Sean Christopherson wrote: > On Fri, May 10, 2024, Nicolas Saenz Julienne wrote: > > From: Sean Christopherson > > > > When injecting an exception into a vCPU in Real Mode, suppress the error > > code by clearing the flag that tracks whether the error code is valid, not > > by clearing the error code itself. The "typo" was introduced by recent > > fix for SVM's funky Paged Real Mode. > > > > Opportunistically hoist the logic above the tracepoint so that the trace > > is coherent with respect to what is actually injected (this was also the > > behavior prior to the buggy commit). > > > > Fixes: b97f07458373 ("KVM: x86: determine if an exception has an error code only when injecting it.") > > Cc: stable@vger.kernel.org > > Cc: Maxim Levitsky > > Signed-off-by: Sean Christopherson > > Message-Id: <20230322143300.2209476-2-seanjc@google.com> > > Signed-off-by: Paolo Bonzini > > (cherry picked from commit 6c41468c7c12d74843bb414fc00307ea8a6318c3) > > [nsaenz: backport to 5.10.y] > > Signed-off-by: Nicolas Saenz Julienne > > > > Conflicts: > > arch/x86/kvm/x86.c: Patch offsets had to be corrected. > > --- > > Testing: Kernel build and VM launch with KVM. > > Unfortunately I don't have a repro for the issue this solves, but the > > patch is straightforward, so I believe the testing above is good enough. > > LOL, famous last words. > > Acked-by: Sean Christopherson > All now queued up, thanks. greg k-h