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


Groups > linux.kernel > #1583911

Re: RFC: Getting rid of LTR in VMX

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: RFC: Getting rid of LTR in VMX
Date 2017-02-18 16:20 +0100
Message-ID <tceXM-3wm-7@gated-at.bofh.it> (permalink)
References <tc42l-4Wt-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 18/02/2017 04:29, Andy Lutomirski wrote:
> There's no code here because the patch is trivial, but I want to run
> the idea by you all first to see if there are any issues.
> 
> VMX is silly and forces the TSS limit to the minimum on VM exits.  KVM
> wastes lots of cycles bumping it back up to accomodate the io bitmap.
> 
> I propose that we rework this.  Add a percpu variable that indicates
> whether the TSS limit needs to be refreshed.  On task switch, if the
> new task has TIF_IO_BITMAP set, then check that flag and, if set,
> refresh TR and clear the flag.  On VMX exit, set the flag.

That's nice.  An alternative is to just use the user return notifier,
which does not need any global change.  This is even simpler and can be
used to benchmark.

> The TSS limit is (phew!) invisible to userspace, so we don't have ABI
> issues to worry about here.  We also shouldn't have security issues
> because a too-low TSS limit just results in unprivileged IO operations
> generating #GP, which is exactly what we want.
> 
> What do you all think?  I expect a speedup of a couple hundred cycles
> on each VM exit.
> 

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


Thread

RFC: Getting rid of LTR in VMX Andy Lutomirski <luto@amacapital.net> - 2017-02-18 04:40 +0100
  Re: RFC: Getting rid of LTR in VMX Paolo Bonzini <pbonzini@redhat.com> - 2017-02-18 16:20 +0100
  Re: RFC: Getting rid of LTR in VMX Paolo Bonzini <pbonzini@redhat.com> - 2017-02-20 12:10 +0100
    Re: RFC: Getting rid of LTR in VMX Andy Lutomirski <luto@amacapital.net> - 2017-02-20 17:50 +0100
      Re: RFC: Getting rid of LTR in VMX Paolo Bonzini <pbonzini@redhat.com> - 2017-02-20 18:00 +0100
        Re: RFC: Getting rid of LTR in VMX Andy Lutomirski <luto@amacapital.net> - 2017-02-20 18:10 +0100
          Re: RFC: Getting rid of LTR in VMX Paolo Bonzini <pbonzini@redhat.com> - 2017-02-20 23:10 +0100
            Re: RFC: Getting rid of LTR in VMX hpa@zytor.com - 2017-02-20 23:30 +0100

csiph-web