From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH v4 63/75] x86/sev-es: Handle #DB Events Date: Wed, 15 Jul 2020 12:31:20 +0200 Message-ID: <20200715103120.GO16200@suse.de> References: <20200714120917.11253-1-joro@8bytes.org> <20200714120917.11253-64-joro@8bytes.org> <20200715084752.GD10769@hirez.programming.kicks-ass.net> <20200715091337.GI16200@suse.de> <20200715095136.GG10769@hirez.programming.kicks-ass.net> <20200715100808.GL16200@suse.de> <20200715101310.GJ10769@hirez.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200715101310.GJ10769@hirez.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org To: Peter Zijlstra Cc: Joerg Roedel , x86@kernel.org, hpa@zytor.com, Andy Lutomirski , Dave Hansen , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org On Wed, Jul 15, 2020 at 12:13:10PM +0200, Peter Zijlstra wrote: > On Wed, Jul 15, 2020 at 12:08:08PM +0200, Joerg Roedel wrote: > > Right, but the handler calls into various other functions. I actually > > started to annotate them all with noinstr, but that was a can of worms > > when calling into generic kernel functions. And the only problem with > > intrumentation in the #VC handler is the #VC-for-#DB exit-code, so I > > decided to only handle this one with instrumentation forbidden and allow > > it for the rest of the handler. > > OK, then maybe change the comment to something like: > > /* > * Handle #DB before calling any !noinstr code to avoid > * recursive #DB. > */ Sounds good, will do. Thanks, Joerg