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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 C6148C47082 for ; Tue, 8 Jun 2021 13:25:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0B736134F for ; Tue, 8 Jun 2021 13:25:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232854AbhFHN1s (ORCPT ); Tue, 8 Jun 2021 09:27:48 -0400 Received: from 8bytes.org ([81.169.241.247]:43072 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231162AbhFHN1r (ORCPT ); Tue, 8 Jun 2021 09:27:47 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 8A7F3386; Tue, 8 Jun 2021 15:25:53 +0200 (CEST) Date: Tue, 8 Jun 2021 15:25:51 +0200 From: Joerg Roedel To: Peter Zijlstra Cc: x86@kernel.org, Joerg Roedel , 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 , Arvind Sankar , linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v3 4/7] x86/sev-es: Run #VC handler in plain IRQ state Message-ID: References: <20210608095439.12668-1-joro@8bytes.org> <20210608095439.12668-5-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi Peter, On Tue, Jun 08, 2021 at 01:58:47PM +0200, Peter Zijlstra wrote: > So #VC cannot happen with IRQs disabled? > > raw_spin_lock_irq(&my_lock); > <#VC> > raw_spin_lock_irqsave(&my_lock); // whoopsie > > Every exception that can happen with IRQs disabled must be NMI like. > > Again, what you seem to want is to split the handler in a from-user and > from-kernel way, just like we did with #DB and MCE. See how > exc_debug_user() is IRQ-like and can send signals, while > exc_debug_kernel() is NMI like and can not. You are right, thanks for pointing this out. I replaced that patch by one implementing the split in a from-user and from-kernel part. Initial testing looks good, will send it out later this week. Thanks, Joerg