mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: David Matlack <dmatlack@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm list" <kvm@vger.kernel.org>,
	bsd@redhat.com, "Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit
Date: Thu, 16 Jun 2016 19:21:58 +0200	[thread overview]
Message-ID: <afad1722-9200-9eef-6116-2a9d4ce2d882@redhat.com> (raw)
In-Reply-To: <CALzav=c6p-QhDcRSLUrvgu32as4Lrm9j5o+hoco3HySQ9NE3pw@mail.gmail.com>



On 16/06/2016 19:03, David Matlack wrote:
> > > If you make the else case the same as svm_handle_external_intr, can we
> > > avoid requiring ack-intr-on-exit?
> >
> > Yes, but the sti/nop/cli would be useless if ack-intr-on-exit is
> > available.  It's a bit ugly, so I RFCed the bold thing instead.
>
> Ahh, and handle_external_intr is called on every VM-exit, not just
> VM-exits caused by external interrupts. So we'd be doing the
> sti/nop/cli quite often. I was thinking we never hit the else case
> when the CPU supports ack-intr-on-exit.

Actually it's really just aesthetics, because the sti and cli are pretty
cheap.  It's the pushf/popf that kills performance for kvm_guest_exit.
I also thought of just doing a cli/sti around __kvm_guest_exit and
calling it a day.

Ubuntu 14.04 had kernel 3.13, but the latest hardware enablement kernels
are as recent as 4.4.  And the most recent released RHEL (7.2) has all
the fixes too.

Debian Jessie has 3.16.7-ckt25, and all three patches for APICv support
have been backported to 3.16.7-ckt11.  So they should be there (but I
can only check tomorrow).

Paolo

>> >
>> > Are you thinking of some distros in particular that lack nested
>> > ack-intr-on-exit?  All processors have it as far as I know.
> Nope, I just thought it was possible to avoid the requirement.
> 

  reply	other threads:[~2016-06-16 17:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16  8:21 [RFC PATCH 0/2] KVM: x86: guest exit microoptimization Paolo Bonzini
2016-06-16  8:21 ` [RFC PATCH 1/2] KVM: x86: always use "acknowledge interrupt on exit" Paolo Bonzini
2016-06-16 21:53   ` Bandan Das
2016-06-16  8:21 ` [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit Paolo Bonzini
2016-06-16 16:43   ` David Matlack
2016-06-16 16:47     ` Paolo Bonzini
2016-06-16 17:03       ` David Matlack
2016-06-16 17:21         ` Paolo Bonzini [this message]
2016-06-16 22:01   ` Bandan Das
2016-06-17  5:20     ` Paolo Bonzini
2016-07-01 16:45 ` [RFC PATCH 0/2] KVM: x86: guest exit microoptimization Paolo Bonzini

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=afad1722-9200-9eef-6116-2a9d4ce2d882@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bsd@redhat.com \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.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

all inboxes | Powered by JetHome®