From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
kvm@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/2] KVM: VMX: Move IRQ invocation to assembly subroutine
Date: Mon, 14 Sep 2020 14:08:08 -0700 [thread overview]
Message-ID: <20200914210808.GC7084@sjchrist-ice> (raw)
In-Reply-To: <CAFULd4aNVW1Wzs=Y9+-wwFw2FyjHZRKe=SPkJ7uBdGmbN6i47A@mail.gmail.com>
On Mon, Sep 14, 2020 at 10:37:25PM +0200, Uros Bizjak wrote:
> On Mon, Sep 14, 2020 at 9:56 PM Sean Christopherson
> <sean.j.christopherson@intel.com> wrote:
> >
> > Move the asm blob that invokes the appropriate IRQ handler after VM-Exit
> > into a proper subroutine. Slightly rework the blob so that it plays
> > nice with objtool without any additional hints (existing hints aren't
> > able to handle returning with a seemingly modified stack size).
> >
> > Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
> > Cc: Uros Bizjak <ubizjak@gmail.com>
> > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> > ---
> > arch/x86/kvm/vmx/vmenter.S | 28 ++++++++++++++++++++++++++++
> > arch/x86/kvm/vmx/vmx.c | 33 +++------------------------------
> > 2 files changed, 31 insertions(+), 30 deletions(-)
> >
> > diff --git a/arch/x86/kvm/vmx/vmenter.S b/arch/x86/kvm/vmx/vmenter.S
> > index 799db084a336..baec1e0fefc5 100644
> > --- a/arch/x86/kvm/vmx/vmenter.S
> > +++ b/arch/x86/kvm/vmx/vmenter.S
> > @@ -4,6 +4,7 @@
> > #include <asm/bitsperlong.h>
> > #include <asm/kvm_vcpu_regs.h>
> > #include <asm/nospec-branch.h>
> > +#include <asm/segment.h>
> >
> > #define WORD_SIZE (BITS_PER_LONG / 8)
> >
> > @@ -294,3 +295,30 @@ SYM_FUNC_START(vmread_error_trampoline)
> >
> > ret
> > SYM_FUNC_END(vmread_error_trampoline)
> > +
> > +SYM_FUNC_START(vmx_do_interrupt_nmi_irqoff)
> > + /*
> > + * Unconditionally create a stack frame. RSP needs to be aligned for
> > + * x86-64, getting the correct RSP on the stack (for x86-64) would take
> > + * two instructions anyways, and it helps make objtool happy (see below).
> > + */
> > + push %_ASM_BP
> > + mov %rsp, %_ASM_BP
>
> _ASM_SP instead of %rsp to avoid assembly failure for 32bit targets.
*sigh* Thanks! I'll build i386 this time...
next prev parent reply other threads:[~2020-09-14 21:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 19:56 [PATCH 0/2] KVM: VMX: Clean up IRQ/NMI handling Sean Christopherson
2020-09-14 19:56 ` [PATCH 2/2] KVM: VMX: Invoke NMI handler via indirect call instead of INTn Sean Christopherson
[not found] ` <20200914195634.12881-2-sean.j.christopherson@intel.com>
2020-09-14 20:37 ` [PATCH 1/2] KVM: VMX: Move IRQ invocation to assembly subroutine Uros Bizjak
2020-09-14 21:08 ` Sean Christopherson [this message]
2020-09-14 20:40 ` Josh Poimboeuf
[not found] ` <20200914210719.GB7084@sjchrist-ice>
2020-09-14 21:21 ` Uros Bizjak
2020-09-14 21:31 ` Uros Bizjak
2020-09-14 21:55 ` Sean Christopherson
2020-09-14 21:38 ` Josh Poimboeuf
2020-09-14 21:54 ` Sean Christopherson
2020-09-15 2:42 ` Andi Kleen
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=20200914210808.GC7084@sjchrist-ice \
--to=sean.j.christopherson@intel.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=pbonzini@redhat.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