1. 17 6月, 2013 4 次提交
  2. 03 6月, 2013 1 次提交
  3. 21 5月, 2013 4 次提交
  4. 19 5月, 2013 1 次提交
  5. 17 4月, 2013 1 次提交
  6. 02 4月, 2013 10 次提交
  7. 18 3月, 2013 1 次提交
  8. 08 3月, 2013 7 次提交
  9. 06 3月, 2013 1 次提交
  10. 05 3月, 2013 3 次提交
  11. 14 2月, 2013 2 次提交
    • 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
    • H
      s390/time: rename tod clock access functions · 1aae0560
      Heiko Carstens 提交于
      Fix name clash with some common code device drivers and add "tod"
      to all tod clock access function names.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      1aae0560
  12. 11 2月, 2013 1 次提交
  13. 30 1月, 2013 2 次提交
    • C
      s390/kvm: Fix instruction decoding · 0c29b229
      Christian Borntraeger 提交于
      Instructions with long displacement have a signed displacement.
      Currently the sign bit is interpreted as 2^20: Lets fix it by doing the
      sign extension from 20bit to 32bit and then use it as a signed variable
      in the addition (see kvm_s390_get_base_disp_rsy).
      
      Furthermore, there are lots of "int" in that code. This is problematic,
      because shifting on a signed integer is undefined/implementation defined
      if the bit value happens to be negative.
      Fortunately the promotion rules will make the right hand side unsigned
      anyway, so there is no real problem right now.
      Let's convert them anyway to unsigned where appropriate to avoid
      problems if the code is changed or copy/pasted later on.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      0c29b229
    • 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
  14. 17 1月, 2013 1 次提交
  15. 16 1月, 2013 1 次提交
    • H
      s390/time: fix sched_clock() overflow · ed4f2094
      Heiko Carstens 提交于
      Converting a 64 Bit TOD format value to nanoseconds means that the value
      must be divided by 4.096. In order to achieve that we multiply with 125
      and divide by 512.
      When used within sched_clock() this triggers an overflow after appr.
      417 days. Resulting in a sched_clock() return value that is much smaller
      than previously and therefore may cause all sort of weird things in
      subsystems that rely on a monotonic sched_clock() behaviour.
      
      To fix this implement a tod_to_ns() helper function which converts TOD
      values without overflow and call this function from both places that
      open coded the conversion: sched_clock() and kvm_s390_handle_wait().
      
      Cc: stable@kernel.org
      Reviewed-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      ed4f2094