1. 07 5月, 2014 6 次提交
  2. 06 5月, 2014 5 次提交
  3. 05 5月, 2014 1 次提交
    • C
      kvm/irqchip: Speed up KVM_SET_GSI_ROUTING · 719d93cd
      Christian Borntraeger 提交于
      When starting lots of dataplane devices the bootup takes very long on
      Christian's s390 with irqfd patches. With larger setups he is even
      able to trigger some timeouts in some components.  Turns out that the
      KVM_SET_GSI_ROUTING ioctl takes very long (strace claims up to 0.1 sec)
      when having multiple CPUs.  This is caused by the  synchronize_rcu and
      the HZ=100 of s390.  By changing the code to use a private srcu we can
      speed things up.  This patch reduces the boot time till mounting root
      from 8 to 2 seconds on my s390 guest with 100 disks.
      
      Uses of hlist_for_each_entry_rcu, hlist_add_head_rcu, hlist_del_init_rcu
      are fine because they do not have lockdep checks (hlist_for_each_entry_rcu
      uses rcu_dereference_raw rather than rcu_dereference, and write-sides
      do not do rcu lockdep at all).
      
      Note that we're hardly relying on the "sleepable" part of srcu.  We just
      want SRCU's faster detection of grace periods.
      
      Testing was done by Andrew Theurer using netperf tests STREAM, MAERTS
      and RR.  The difference between results "before" and "after" the patch
      has mean -0.2% and standard deviation 0.6%.  Using a paired t-test on the
      data points says that there is a 2.5% probability that the patch is the
      cause of the performance difference (rather than a random fluctuation).
      
      (Restricting the t-test to RR, which is the most likely to be affected,
      changes the numbers to respectively -0.3% mean, 0.7% stdev, and 8%
      probability that the numbers actually say something about the patch.
      The probability increases mostly because there are fewer data points).
      
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> # s390
      Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      719d93cd
  4. 30 4月, 2014 1 次提交
    • P
      Merge tag 'kvm-s390-20140429' of... · 57b5981c
      Paolo Bonzini 提交于
      Merge tag 'kvm-s390-20140429' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-next
      
      1. Guest handling fixes
      The handling of MVPG, PFMF and Test Block is fixed to better follow
      the architecture. None of these fixes is critical for any current
      Linux guests, but let's play safe.
      
      2. Optimization for single CPU guests
      We can enable the IBS facility if only one VCPU is running (!STOPPED
      state). We also enable this optimization for guest > 1 VCPU as soon
      as all but one VCPU is in stopped state. Thus will help guests that
      have tools like cpuplugd (from s390-utils) that do dynamic offline/
      online of CPUs.
      
      3. NOTES
      There is one non-s390 change in include/linux/kvm_host.h that
      introduces 2 defines for VCPU requests:
      define KVM_REQ_ENABLE_IBS        23
      define KVM_REQ_DISABLE_IBS       24
      57b5981c
  5. 29 4月, 2014 7 次提交
  6. 28 4月, 2014 2 次提交
  7. 24 4月, 2014 9 次提交
  8. 23 4月, 2014 4 次提交
  9. 22 4月, 2014 5 次提交
    • M
      Merge tag 'kvm-s390-20140422' of... · 63b5cf04
      Marcelo Tosatti 提交于
      Merge tag 'kvm-s390-20140422' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into queue
      
      Lazy storage key handling
      -------------------------
      Linux does not use the ACC and F bits of the storage key. Newer Linux
      versions also do not use the storage keys for dirty and reference
      tracking. We can optimize the guest handling for those guests for faults
      as well as page-in and page-out by simply not caring about the guest
      visible storage key. We trap guest storage key instruction to enable
      those keys only on demand.
      
      Migration bitmap
      
      Until now s390 never provided a proper dirty bitmap.  Let's provide a
      proper migration bitmap for s390. We also change the user dirty tracking
      to a fault based mechanism. This makes the host completely independent
      from the storage keys. Long term this will allow us to back guest memory
      with large pages.
      
      per-VM device attributes
      ------------------------
      To avoid the introduction of new ioctls, let's provide the
      attribute semanantic also on the VM-"device".
      
      Userspace controlled CMMA
      -------------------------
      The CMMA assist is changed from "always on" to "on if requested" via
      per-VM device attributes. In addition a callback to reset all usage
      states is provided.
      
      Proper guest DAT handling for intercepts
      ----------------------------------------
      While instructions handled by SIE take care of all addressing aspects,
      KVM/s390 currently does not care about guest address translation of
      intercepts. This worked out fine, because
      - the s390 Linux kernel has a 1:1 mapping between kernel virtual<->real
       for all pages up to memory size
      - intercepts happen only for a small amount of cases
      - all of these intercepts happen to be in the kernel text for current
        distros
      
      Of course we need to be better for other intercepts, kernel modules etc.
      We provide the infrastructure and rework all in-kernel intercepts to work
      on logical addresses (paging etc) instead of real ones. The code has
      been running internally for several months now, so it is time for going
      public.
      
      GDB support
      -----------
      We provide breakpoints, single stepping and watchpoints.
      
      Fixes/Cleanups
      --------------
      - Improve program check delivery
      - Factor out the handling of transactional memory  on program checks
      - Use the existing define __LC_PGM_TDB
      - Several cleanups in the lowcore structure
      - Documentation
      
      NOTES
      -----
      - All patches touching base s390 are either ACKed or written by the s390
        maintainers
      - One base KVM patch "KVM: add kvm_is_error_gpa() helper"
      - One patch introduces the notion of VM device attributes
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      
      Conflicts:
      	include/uapi/linux/kvm.h
      63b5cf04
    • M
      KVM: s390: Factor out handle_itdb to handle TX aborts · e325fe69
      Michael Mueller 提交于
      Factor out the new function handle_itdb(), which copies the ITDB into
      guest lowcore to fully handle a TX abort.
      Signed-off-by: NMichael Mueller <mimu@linux.vnet.ibm.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      e325fe69
    • M
      KVM: s390: replace TDB_ADDR by __LC_PGM_TDB · a86dcc24
      Michael Mueller 提交于
      The generically assembled low core labels already contain the
      address for the TDB.
      Signed-off-by: NMichael Mueller <mimu@linux.vnet.ibm.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      a86dcc24
    • C
      KVM: s390: Drop pending interrupts on guest exit · 67335e63
      Christian Borntraeger 提交于
      On hard exits (abort, sigkill) we have have some kvm_s390_interrupt_info
      structures hanging around. Delete those on exit to avoid memory leaks.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      CC: stable@vger.kernel.org
      Reviewed-by: NThomas Huth <thuth@linux.vnet.ibm.com>
      67335e63
    • D
      KVM: s390: no timer interrupts when single-stepping a guest · f71d0dc5
      David Hildenbrand 提交于
      When a guest is single-stepped, we want to disable timer interrupts. Otherwise,
      the guest will continuously execute the external interrupt handler and make
      debugging of code where timer interrupts are enabled almost impossible.
      
      The delivery of timer interrupts can be enforced in such sections by setting a
      breakpoint and continuing execution.
      
      In order to disable timer interrupts, they are disabled in the control register
      of the guest just before SIE entry and are suppressed in the interrupt
      check/delivery methods.
      Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      f71d0dc5