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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 2D032C433B4 for ; Wed, 5 May 2021 00:00:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE9D96138C for ; Wed, 5 May 2021 00:00:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231140AbhEEABN (ORCPT ); Tue, 4 May 2021 20:01:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230465AbhEEABJ (ORCPT ); Tue, 4 May 2021 20:01:09 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22074C061574 for ; Tue, 4 May 2021 17:00:13 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1620172811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BZzghc/nFD5fYlTllIJmP+Dhcf+7hU/myWi1v8XwhJQ=; b=vMKVmOxlToHWiasA1xWm8XkYL9pNS3a2/LMx3puvPlQ+DBFhzwOw4Ibq45GXoeQnqcijfy QcQrG5es7NXabAQ2/ydHndSOAIf9c/8HHrR4msa99G6fJ0vyFWV+TiDUpqhuZLHEiaOLMh XbbBhF1DpPWf5YaiO/jX1WTqdH20bhf5JNe/aaM5biU756r+IPYV/UF7rOoFQKIKI7l87+ eYYdhv7ftQe3vJP9NlvekkqiCSCUmWCsr3BLfKS9KwV0KFfmBpy8JWp6O18ts4+Yne0LUs 2b1wLY4fXTs9yACR0q0VCS9IgxbKcR8po73nmTqJyIC0qruffit9CHbpgAIHwg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1620172811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BZzghc/nFD5fYlTllIJmP+Dhcf+7hU/myWi1v8XwhJQ=; b=rbeivPGOq5d/U+dluGnKE5Rkrq/cG+JtQbDQ6zSoRhhEEthtRTy56a3XhL/cpCJswICAT2 xtnAaGeXLf8ntGDg== To: Paolo Bonzini , Sean Christopherson Cc: Andy Lutomirski , Maxim Levitsky , Lai Jiangshan , linux-kernel@vger.kernel.org, Lai Jiangshan , Steven Rostedt , Andi Kleen , Andy Lutomirski , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Josh Poimboeuf , Uros Bizjak , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Alexandre Chartre , Juergen Gross , Joerg Roedel , Jian Cai Subject: Re: [PATCH] KVM/VMX: Invoke NMI non-IST entry instead of IST entry In-Reply-To: <5d7ca301-a0b2-d389-3bc2-feb304c9f5b5@redhat.com> References: <38B9D60F-F24F-4910-B2DF-2A57F1060452@amacapital.net> <625057c7-ea40-4f37-8bea-cddecfe1b855@redhat.com> <5d7ca301-a0b2-d389-3bc2-feb304c9f5b5@redhat.com> Date: Wed, 05 May 2021 02:00:10 +0200 Message-ID: <87im3yhwxh.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 04 2021 at 23:56, Paolo Bonzini wrote: > On 04/05/21 23:51, Sean Christopherson wrote: >> On Tue, May 04, 2021, Paolo Bonzini wrote: >>> On 04/05/21 23:23, Andy Lutomirski wrote: >>>>> On May 4, 2021, at 2:21 PM, Sean Christopherson wrote: >>>>> FWIW, NMIs are masked if the VM-Exit was due to an NMI. >>> >>> Huh, indeed: "An NMI causes subsequent NMIs to be blocked, but only after >>> the VM exit completes". >>> >>>> Then this whole change is busted, since nothing will unmask NMIs. Revert it? >>> Looks like the easiest way out indeed. >> >> I've no objection to reverting to intn, but what does reverting versus handling >> NMI on the kernel stack have to do with NMIs being blocked on VM-Exit due to NMI? >> I'm struggling mightily to connect the dots. > > Nah, you're right: vmx_do_interrupt_nmi_irqoff will not call the handler > directly, rather it calls the IDT entrypoint which *will* do an IRET and > unmask NMIs. I trusted Andy too much on this one. :) > > Thomas's posted patch ("[PATCH] KVM/VMX: Invoke NMI non-IST entry > instead of IST entry") looks good. Well, looks good is one thing. It would be more helpful if someone would actually review and/or test it. Thanks, tglx