From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH v3 40/75] x86/sev-es: Compile early handler code into kernel image Date: Thu, 11 Jun 2020 12:05:19 +0200 Message-ID: <20200611100519.GB32093@8bytes.org> References: <20200428151725.31091-1-joro@8bytes.org> <20200428151725.31091-41-joro@8bytes.org> <20200520091415.GC1457@zn.tnic> <20200604115413.GB30945@8bytes.org> <20200604151945.GB2246@zn.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200604151945.GB2246@zn.tnic> Sender: linux-kernel-owner@vger.kernel.org To: Borislav Petkov Cc: x86@kernel.org, hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Joerg Roedel , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org On Thu, Jun 04, 2020 at 05:19:53PM +0200, Borislav Petkov wrote: > On Thu, Jun 04, 2020 at 01:54:13PM +0200, Joerg Roedel wrote: > > It is not only the trace-point, this would also eliminate exception > > handling in case the MSR access triggers a #GP. The "Unhandled MSR > > read/write" messages would turn into a "General Protection Fault" > > message. > > But the early ones can trigger a #GP too. And there we can't handle > those #GPs. > > Why would the late ones need exception handling all of a sudden? And > for the GHCB MSR, of all MSRs which the SEV-ES guest has used so far to > bootstrap?! For example when there is a bug in the code which triggers an SEV-ES-only code-path at runtime on bare-metal or in a non-SEV-ES VM. When the MSR is accessed accidentially in that code-path the exception handling will be helpful. Joerg