Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1424303

Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit
Date 2016-06-16 19:30 +0200
Message-ID <rKJh8-2MG-33@gated-at.bofh.it> (permalink)
References <rKAQx-5Ue-7@gated-at.bofh.it> <rKAQy-5Ue-11@gated-at.bofh.it> <rKIEq-2jH-35@gated-at.bofh.it> <rKIEq-2jH-33@gated-at.bofh.it> <rKIXM-2Gg-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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.
> 

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 0/2] KVM: x86: guest exit microoptimization Paolo Bonzini <pbonzini@redhat.com> - 2016-06-16 10:30 +0200
  [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit Paolo Bonzini <pbonzini@redhat.com> - 2016-06-16 10:30 +0200
    Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit David Matlack <dmatlack@google.com> - 2016-06-16 18:50 +0200
      Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit Paolo Bonzini <pbonzini@redhat.com> - 2016-06-16 18:50 +0200
        Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit David Matlack <dmatlack@google.com> - 2016-06-16 19:10 +0200
          Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit Paolo Bonzini <pbonzini@redhat.com> - 2016-06-16 19:30 +0200
    Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit Bandan Das <bsd@redhat.com> - 2016-06-17 00:10 +0200
      Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit Paolo Bonzini <pbonzini@redhat.com> - 2016-06-17 07:30 +0200

csiph-web