From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Josh Poimboeuf <jpoimboe@redhat.com>,
Uros Bizjak <ubizjak@gmail.com>, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH v2 0/2] KVM: VMX: Clean up IRQ/NMI handling
Date: Tue, 22 Sep 2020 15:38:24 +0200 [thread overview]
Message-ID: <4a6aaa8a-c62c-5f7c-da3e-14a68a835487@redhat.com> (raw)
In-Reply-To: <20200915191505.10355-1-sean.j.christopherson@intel.com>
On 15/09/20 21:15, Sean Christopherson wrote:
> Clean up KVM's handling of IRQ and NMI exits to move the invocation of the
> IRQ handler to a standalone assembly routine, and to then consolidate the
> NMI handling to use the same indirect call approach instead of using INTn.
>
> The IRQ cleanup was suggested by Josh Poimboeuf in the context of a false
> postive objtool warning[*]. I believe Josh intended to use UNWIND hints
> instead of trickery to avoid objtool complaints. I opted for trickery in
> the form of a redundant, but explicit, restoration of RSP after the hidden
> IRET. AFAICT, there are no existing UNWIND hints that would let objtool
> know that the stack is magically being restored, and adding a new hint to
> save a single MOV <reg>, <reg> instruction seemed like overkill.
>
> The NMI consolidation was loosely suggested by Andi Kleen. Andi's actual
> suggestion was to export and directly call the NMI handler, but that's a
> more involved change (unless I'm misunderstanding the wants of the NMI
> handler), whereas piggybacking the IRQ code is simple and seems like a
> worthwhile intermediate step.
>
> Sean Christopherson (2):
> KVM: VMX: Move IRQ invocation to assembly subroutine
> KVM: VMX: Invoke NMI handler via indirect call instead of INTn
>
> arch/x86/kvm/vmx/vmenter.S | 34 +++++++++++++++++++++
> arch/x86/kvm/vmx/vmx.c | 61 +++++++++++---------------------------
> 2 files changed, 51 insertions(+), 44 deletions(-)
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2020-09-22 13:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 19:15 [PATCH v2 0/2] KVM: VMX: Clean up IRQ/NMI handling Sean Christopherson
2020-09-15 19:15 ` [PATCH v2 1/2] KVM: VMX: Move IRQ invocation to assembly subroutine Sean Christopherson
2020-09-15 19:27 ` Josh Poimboeuf
2020-09-15 19:38 ` Uros Bizjak
2020-09-15 19:15 ` [PATCH v2 2/2] KVM: VMX: Invoke NMI handler via indirect call instead of INTn Sean Christopherson
2021-04-26 9:33 ` Lai Jiangshan
2021-04-26 10:40 ` Paolo Bonzini
2021-04-26 11:44 ` Maxim Levitsky
2021-04-26 13:59 ` Steven Rostedt
2021-04-26 14:51 ` Andi Kleen
2021-04-26 15:09 ` Andy Lutomirski
2021-04-27 0:54 ` Lai Jiangshan
2021-04-27 1:00 ` Steven Rostedt
2021-04-27 7:05 ` Paolo Bonzini
2021-04-30 2:56 ` Lai Jiangshan
2020-09-22 13:38 ` Paolo Bonzini [this message]
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=4a6aaa8a-c62c-5f7c-da3e-14a68a835487@redhat.com \
--to=pbonzini@redhat.com \
--cc=ak@linux.intel.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=jpoimboe@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sean.j.christopherson@intel.com \
--cc=ubizjak@gmail.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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