1. 30 1月, 2014 2 次提交
  2. 20 1月, 2014 1 次提交
    • C
      KVM: s390: Fix memory access error detection · 699bde3b
      Christian Borntraeger 提交于
      Seems that commit 210b1607
      (KVM: s390: Removed SIE_INTERCEPT_UCONTROL) lost a hunk when we
      reworked our patch queue to rework the async_fp code. We now
      ignore faults on the sie instruction (guest accesses non-existing
      memory) instead of sending a fault into the guest. This leads to
      hang situations with the old virtio transport that checks for
      descriptor memory after guest memory. Instead of bailing out this
      code now goes wild...
      Lets re-add the check.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      699bde3b
  3. 17 1月, 2014 2 次提交
  4. 28 11月, 2013 3 次提交
  5. 24 10月, 2013 1 次提交
    • M
      s390: fix save and restore of the floating-point-control register · 4725c860
      Martin Schwidefsky 提交于
      The FPC_VALID_MASK has been used to check the validity of the value
      to be loaded into the floating-point-control register. With the
      introduction of the floating-point extension facility and the
      decimal-floating-point additional bits have been defined which need
      to be checked in a non straight forward way. So far these bits have
      been ignored which can cause an incorrect results for decimal-
      floating-point operations, e.g. an incorrect rounding mode to be
      set after signal return.
      
      The static check with the FPC_VALID_MASK is replaced with a trial
      load of the floating-point-control value, see test_fp_ctl.
      
      In addition an information leak with the padding word between the
      floating-point-control word and the floating-point registers in
      the s390_fp_regs is fixed.
      Reported-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Reviewed-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      4725c860
  6. 17 10月, 2013 1 次提交
  7. 25 9月, 2013 4 次提交
  8. 29 7月, 2013 2 次提交
  9. 18 7月, 2013 1 次提交
  10. 17 6月, 2013 3 次提交
  11. 03 6月, 2013 1 次提交
  12. 21 5月, 2013 3 次提交
  13. 02 4月, 2013 4 次提交
  14. 06 3月, 2013 1 次提交
  15. 05 3月, 2013 3 次提交
  16. 14 2月, 2013 1 次提交
    • M
      s390/mm: implement software dirty bits · abf09bed
      Martin Schwidefsky 提交于
      The s390 architecture is unique in respect to dirty page detection,
      it uses the change bit in the per-page storage key to track page
      modifications. All other architectures track dirty bits by means
      of page table entries. This property of s390 has caused numerous
      problems in the past, e.g. see git commit ef5d437f
      "mm: fix XFS oops due to dirty pages without buffers on s390".
      
      To avoid future issues in regard to per-page dirty bits convert
      s390 to a fault based software dirty bit detection mechanism. All
      user page table entries which are marked as clean will be hardware
      read-only, even if the pte is supposed to be writable. A write by
      the user process will trigger a protection fault which will cause
      the user pte to be marked as dirty and the hardware read-only bit
      is removed.
      
      With this change the dirty bit in the storage key is irrelevant
      for Linux as a host, but the storage key is still required for
      KVM guests. The effect is that page_test_and_clear_dirty and the
      related code can be removed. The referenced bit in the storage
      key is still used by the page_test_and_clear_young primitive to
      provide page age information.
      
      For page cache pages of mappings with mapping_cap_account_dirty
      there will not be any change in behavior as the dirty bit tracking
      already uses read-only ptes to control the amount of dirty pages.
      Only for swap cache pages and pages of mappings without
      mapping_cap_account_dirty there can be additional protection faults.
      To avoid an excessive number of additional faults the mk_pte
      primitive checks for PageDirty if the pgprot value allows for writes
      and pre-dirties the pte. That avoids all additional faults for
      tmpfs and shmem pages until these pages are added to the swap cache.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      abf09bed
  17. 30 1月, 2013 1 次提交
    • C
      s390/kvm: Fix store status for ACRS/FPRS · 15bc8d84
      Christian Borntraeger 提交于
      On store status we need to copy the current state of registers
      into a save area. Currently we might save stale versions:
      The sie state descriptor doesnt have fields for guest ACRS,FPRS,
      those registers are simply stored in the host registers. The host
      program must copy these away if needed. We do that in vcpu_put/load.
      
      If we now do a store status in KVM code between vcpu_put/load, the
      saved values are not up-to-date. Lets collect the ACRS/FPRS before
      saving them.
      
      This also fixes some strange problems with hotplug and virtio-ccw,
      since the low level machine check handler (on hotplug a machine check
      will happen) will revalidate all registers with the content of the
      save area.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      CC: stable@vger.kernel.org
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      15bc8d84
  18. 11 1月, 2013 1 次提交
  19. 08 1月, 2013 2 次提交
  20. 14 12月, 2012 1 次提交
  21. 28 11月, 2012 1 次提交
  22. 30 10月, 2012 1 次提交
    • F
      kvm: Directly account vtime to system on guest switch · b080935c
      Frederic Weisbecker 提交于
      Switching to or from guest context is done on ioctl context.
      So by the time we call kvm_guest_enter() or kvm_guest_exit()
      we know we are not running the idle task.
      
      As a result, we can directly account the cputime using
      vtime_account_system().
      
      There are two good reasons to do this:
      
      * We avoid some useless checks on guest switch. It optimizes
      a bit this fast path.
      
      * In the case of CONFIG_IRQ_TIME_ACCOUNTING, calling vtime_account()
      checks for irq time to account. This is pointless since we know
      we are not in an irq on guest switch. This is wasting cpu cycles
      for no good reason. vtime_account_system() OTOH is a no-op in
      this config option.
      
      * We can remove the irq disable/enable around kvm guest switch in s390.
      
      A further optimization may consist in introducing a vtime_account_guest()
      that directly calls account_guest_time().
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Joerg Roedel <joerg.roedel@amd.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Xiantao Zhang <xiantao.zhang@intel.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      b080935c