Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2056167rwb; Fri, 11 Nov 2022 04:33:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf6dp0cKYOBpW92Bnd5PVr6GF/q73f1rWaHC8WiAY0vvAGQwx9XSk3nLuXZ9dCJfZhaDVE7v X-Received: by 2002:a17:907:9144:b0:7a8:3597:34a8 with SMTP id l4-20020a170907914400b007a8359734a8mr1625307ejs.628.1668170001646; Fri, 11 Nov 2022 04:33:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668170001; cv=none; d=google.com; s=arc-20160816; b=SWhN+NuJiRTa8aKJeoWyT6Ayx5U+Vq1xF8BH1AYL7HYrf0ezfbDHl33q6K66d2Gnul Byx25HO7PBcrRDJkH0n6IjzdGNkUlSqNeTuiFq2gouWPrBRDkq9dfW1l5nTF3s35nCIz q80rC9CHvL3ALuSau7kIco7MoO7nYPVezacJ3Drc08M0lAzPvrrClQ4VFdM536WlBQbf pMA0xyYoqvEIrUOVBPlvebtPxgPeb9lP9OMKgteJwDgQ1lhEJYK/Yh+2Ml0ByekoBsg7 zza6rLCSOvlK6jXwFfvAZLgIByrG4LR3ZRjDZL75+3Ddh53AMus/Ab1gGO+4vP/ABAwQ Vyaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TrDl26UsM79jWFLz4hQEcMFLuhNP+LrmD1HvrzIRqQ4=; b=cWu1rINL3AleR8K+pdO4Xh3wGBtiOLuK+CFYpPLUYnW905ftTkDEB3zA8fzM5uWKnB un/JHXw3KKq72O3oXcy7gG6UXVkZK0zibRVzto2b0hcstReuOOylzR2uDFULFkFMzqSh zFgw6DvfdCMaawbEFTr01hEh2H4AwXFLr0I472pLReMR9QJFRYMPfUn4y8UqfJkTMt0F 7A8Pd1yb3xIaBX1iNxshwkWjG8Bs4saHTCarV6+4AtgVn0DNCpPm1Gu07B4ct4lwjsdF ARYsMF5ZfD59SmTqO7M+VO5wDgBm2qsK3fLFRwQRpF7h56K4JL04Q3HUwtL7REs+F9Pp vf2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=WUiY5ty1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn31-20020a1709070d1f00b0078e1246e7d6si1760471ejc.748.2022.11.11.04.32.58; Fri, 11 Nov 2022 04:33:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=WUiY5ty1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233761AbiKKMTt (ORCPT + 92 others); Fri, 11 Nov 2022 07:19:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231564AbiKKMTr (ORCPT ); Fri, 11 Nov 2022 07:19:47 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C436627F8; Fri, 11 Nov 2022 04:19:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=TrDl26UsM79jWFLz4hQEcMFLuhNP+LrmD1HvrzIRqQ4=; b=WUiY5ty1bQBGkV9KPNLMZzL8H7 XqcORPxICEQQf07CBPhAaeW/D0mx+3X20oul9/09wz8IwTaOYtV6d1YLRMwPRpBOujHeFL8gTqGS3 dkbXK5ShksixPARtpRr6ocYYGyLPGGuwCAYUznuVVoT04tFAFicH1mX3Va4IsMb6xcjAWhkFJfoBr 8gtBiTZSZO/k2JcQtyE6a00g/sfSH7zSQAKBzM7Bz15UpqkT88Q0HrZXvWlixaV2rJgkXR6Mm83MU kWUvOEunBQDp4phng54TlZuxHIFE3MDOghnqxJOdwahUmjX6VbpWMpqqMYXMNK5Aw+Z2TiDEAoXpj HicRFA2A==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1otT0T-00D2IT-Mu; Fri, 11 Nov 2022 12:19:37 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E046C30013F; Fri, 11 Nov 2022 13:19:31 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CF06820831B7F; Fri, 11 Nov 2022 13:19:31 +0100 (CET) Date: Fri, 11 Nov 2022 13:19:31 +0100 From: Peter Zijlstra To: Paolo Bonzini Cc: "Li, Xin3" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "kvm@vger.kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "hpa@zytor.com" , "Christopherson,, Sean" , "Tian, Kevin" Subject: Re: [RESEND PATCH 5/6] KVM: x86/VMX: add kvm_vmx_reinject_nmi_irq() for NMI/IRQ reinjection Message-ID: References: <20221110061545.1531-1-xin3.li@intel.com> <20221110061545.1531-6-xin3.li@intel.com> <6097036e-063f-5175-72b2-8935b12af853@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6097036e-063f-5175-72b2-8935b12af853@redhat.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 11, 2022 at 01:04:27PM +0100, Paolo Bonzini wrote: > On 11/11/22 10:15, Peter Zijlstra wrote: > > I don't speak virt (but this all sounds disguisting) > > Yes, it is. AMD does not need this, they just hold onto the interrupt > until the host has issued both STGI (for NMIs) and STI (for IRQs). Right -- Cooper just explained that to me. > On Intel you can optionally make it hold onto IRQs, but NMIs are always > eaten by the VMEXIT and have to be reinjected manually. That 'optionally' thing worries me -- as in, KVM is currently opting-out? Since much of this is about preparing for FRED, can we pretty *PLEASE* fix this VMX NMI hole instead so that all this nonsense isn't needed anymore, please, really please? Have FRED imply a GI flag for VMX or something and then we can all forget about these reinjection horrors.