1. 17 Feb, 2017 1 commit
    • Paolo Bonzini's avatar
      KVM: race-free exit from KVM_RUN without POSIX signals · 460df4c1
      Paolo Bonzini authored
      The purpose of the KVM_SET_SIGNAL_MASK API is to let userspace "kick"
      a VCPU out of KVM_RUN through a POSIX signal.  A signal is attached
      to a dummy signal handler; by blocking the signal outside KVM_RUN and
      unblocking it inside, this possible race is closed:
      
                VCPU thread                     service thread
         --------------------------------------------------------------
              check flag
                                                set flag
                                                raise signal
              (signal handler does nothing)
              KVM_RUN
      
      However, one issue with KVM_SET_SIGNAL_MASK is that it has to take
      tsk->sighand->siglock on every KVM_RUN.  This lock is often on a
      remote NUMA node, because it is on the node of a thread's creator.
      Taking this lock can be very expensive if there are many userspace
      exits (as is the case for SMP Windows VMs without Hyper-V reference
      time counter).
      
      As an alternative, we can put the flag directly in kvm_run so that
      KVM can see it:
      
                VCPU thread                     service thread
         --------------------------------------------------------------
                                                raise signal
              signal handler
                set run->immediate_exit
              KVM_RUN
                check run->immediate_exit
      Reviewed-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      460df4c1
  2. 16 Feb, 2017 5 commits
  3. 15 Feb, 2017 15 commits
  4. 09 Feb, 2017 3 commits
  5. 08 Feb, 2017 15 commits
  6. 07 Feb, 2017 1 commit
    • Paolo Bonzini's avatar
      Merge tag 'kvm-s390-next-4.11-2' of... · 8f00067a
      Paolo Bonzini authored
      Merge tag 'kvm-s390-next-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
      
      KVM: s390: Fixes and features for 4.11 (via kvm/next)
      
      - enable some simd extensions for guests
      - enable nx for guests
      - debug log for cpu model
      - PER fixes
      - remove bitwise annotation from ar_t
      - detect guests in operation exception program check loops
      - fix potential null-pointer dereference for ucontrol guests
      
      - also contains merge for fix that went into 4.10 to avoid conflicts
      8f00067a