From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFE06C433E3 for ; Wed, 15 Jul 2020 10:31:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE49E2071B for ; Wed, 15 Jul 2020 10:31:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731153AbgGOKbZ (ORCPT ); Wed, 15 Jul 2020 06:31:25 -0400 Received: from [195.135.220.15] ([195.135.220.15]:56700 "EHLO mx2.suse.de" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1729086AbgGOKbY (ORCPT ); Wed, 15 Jul 2020 06:31:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 18B25B57B; Wed, 15 Jul 2020 10:31:26 +0000 (UTC) Date: Wed, 15 Jul 2020 12:31:20 +0200 From: Joerg Roedel 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 Subject: Re: [PATCH v4 63/75] x86/sev-es: Handle #DB Events 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 Content-Disposition: inline In-Reply-To: <20200715101310.GJ10769@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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