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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1A99C433FE for ; Fri, 11 Nov 2022 12:10:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233825AbiKKMKr (ORCPT ); Fri, 11 Nov 2022 07:10:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233807AbiKKMKo (ORCPT ); Fri, 11 Nov 2022 07:10:44 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC825EE37 for ; Fri, 11 Nov 2022 04:10:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=x/4kMcD6iSpRsQ45fMznjzX9v02Cn/wjOY7VCMvtZ98=; b=ikG4RsVxFIZgZpPDwsGH827sLp vavwCBYxoD+DPHLuuhuykPvy8CrF0RdRt8iqZty+57l630ckP5TvssMsuaDDx9ve82yYuxCLKEzbY 6h3zO0WtU5uQUEQ1g1IlqoBLCxm2VvlIgVf8xOoGJVcJIAlu4SMjdwAwf4Yn5L64zXzabgHplJRs9 LQoY8005g7iWrtfBsPr9eissmmbxfTDf9/oV5FC2SpIeD1kV7VSbImfzyGTtip3b4FFekW9ijOzmL RCjHbrnU8etvoi1JhSI5VAdiBRNQbSV2VIGyiNxFZLxOBlD8kHATQgJ9fJPl+DWPOOrZO1/S/gkpU lxknLo3Q==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1otSrD-0002D5-6b; Fri, 11 Nov 2022 12:10:10 +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 8C6A2300454; Fri, 11 Nov 2022 13:10:01 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 750F620839A5A; Fri, 11 Nov 2022 13:10:01 +0100 (CET) Date: Fri, 11 Nov 2022 13:10:01 +0100 From: Peter Zijlstra To: Paolo Bonzini Cc: "H. Peter Anvin" , Sean Christopherson , "Li, Xin3" , "linux-kernel@vger.kernnel.org" , "x86@kernel.org" , "kvm@vger.kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "Tian, Kevin" Subject: Re: [PATCH 5/6] KVM: x86/VMX: add kvm_vmx_reinject_nmi_irq() for NMI/IRQ reinjection Message-ID: References: <20221110055347.7463-1-xin3.li@intel.com> <20221110055347.7463-6-xin3.li@intel.com> <3A1B7743-9448-405A-8BE4-E1BDAB4D62F8@zytor.com> 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 On Fri, Nov 11, 2022 at 12:57:58PM +0100, Paolo Bonzini wrote: > On 11/11/22 11:45, Peter Zijlstra wrote: > > > What is "correct" in this context? > > > > I don't know since I don't really speak virt, but I could image the > > regset that would match the vmrun (or whatever intel decided to call > > that again) instruction. > > Right now it is not exactly that but close. The RIP is somewhere in > vmx_do_interrupt_nmi_irqoff; CS/SS are correct (i.e. it's not like they > point to guest values!) and other registers including RSP and RFLAGS are > consistent with the RIP. *phew*, that sounds a *lot* better than 'random'. And yes, that should do. Another thing; these patches appear to be about system vectors and everything, but what I understand from Andrew is that VMX is only screwy vs NMI, not regular interrupts/exceptions, so where does that come from? SVM specifically fixed the NMI wonkyness with their Global Interrupt flag thingy.