From: Sean Christopherson <seanjc@google.com>
To: "Li, Xin3" <xin3.li@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
"Lutomirski, Andy" <luto@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 6/7] KVM: VMX: Provide separate subroutines for invoking NMI vs. IRQ handlers
Date: Thu, 15 Dec 2022 00:26:52 +0000 [thread overview]
Message-ID: <Y5ppzEEqFB1XqhoJ@google.com> (raw)
In-Reply-To: <BN6PR1101MB2161B2CB247273CDD85F4C19A8E09@BN6PR1101MB2161.namprd11.prod.outlook.com>
On Wed, Dec 14, 2022, Li, Xin3 wrote:
> > +
> > + /*
> > + * "Restore" RSP from RBP, even though IRET has already unwound
> > RSP to
> > + * the correct value. objtool doesn't know the callee will IRET and,
> > + * without the explicit restore, thinks the stack is getting walloped.
> > + * Using an unwind hint is problematic due to x86-64's dynamic
> > alignment.
> > + */
> > + mov %_ASM_BP, %_ASM_SP
> > + pop %_ASM_BP
> > + RET
>
> For NMI, after this RET instruction, we continue to block NMIs. IRET instead?
No, IRET has already been done by the kernel-provided handler, e.g. asm_exc_nmi_kvm_vmx()
by way of error_return(). That's why the CALL above (that got snipped) is preceded
by the creation of a synthetic NMI/IRQ stack frame: the target returns from the CALL
via IRET, not RET.
next prev parent reply other threads:[~2022-12-15 0:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 6:09 [PATCH 0/7] KVM: VMX: Handle NMI VM-Exits in noinstr section Sean Christopherson
2022-12-13 6:09 ` [PATCH 1/7] KVM: x86: Make vmx_get_exit_qual() and vmx_get_intr_info() noinstr-friendly Sean Christopherson
2022-12-13 6:09 ` [PATCH 2/7] KVM: VMX: Allow VM-Fail path of VMREAD helper to be instrumented Sean Christopherson
2022-12-13 6:09 ` [PATCH 3/7] KVM: VMX: Always inline eVMCS read/write helpers Sean Christopherson
2022-12-13 6:09 ` [PATCH 4/7] KVM: VMX: Always inline to_vmx() and to_kvm_vmx() Sean Christopherson
2022-12-13 6:09 ` [PATCH 5/7] x86/entry: KVM: Use dedicated VMX NMI entry for 32-bit kernels too Sean Christopherson
2022-12-14 8:05 ` Lai Jiangshan
2022-12-13 6:09 ` [PATCH 6/7] KVM: VMX: Provide separate subroutines for invoking NMI vs. IRQ handlers Sean Christopherson
2022-12-14 21:23 ` Li, Xin3
2022-12-15 0:26 ` Sean Christopherson [this message]
2022-12-15 3:06 ` Li, Xin3
2022-12-15 5:18 ` Li, Xin3
2022-12-13 6:09 ` [PATCH 7/7] KVM: VMX: Handle NMI VM-Exits in noinstr region Sean Christopherson
2023-01-19 9:49 ` Peter Zijlstra
2023-01-19 15:39 ` Sean Christopherson
2023-01-19 15:52 ` Peter Zijlstra
2023-08-24 6:57 ` Like Xu
2023-08-24 14:16 ` Sean Christopherson
2023-08-24 14:26 ` Sean Christopherson
2022-12-14 17:09 ` [PATCH 0/7] KVM: VMX: Handle NMI VM-Exits in noinstr section Li, Xin3
2023-01-18 19:14 ` Li, Xin3
2023-01-18 20:38 ` Sean Christopherson
2023-01-19 1:54 ` Li, Xin3
2023-01-19 9:50 ` Peter Zijlstra
2023-01-28 0:07 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y5ppzEEqFB1XqhoJ@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=xin3.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox