1. 17 6月, 2015 3 次提交
    • A
      target-s390x: mvc_fast_memmove: access memory through softmmu · 6da528d1
      Aurelien Jarno 提交于
      mvc_fast_memmove is bypassing the softmmu functions, getting the
      physical source and destination addresses using the mmu_translate
      function and accessing the corresponding physical memory. This
      prevents watchpoints to work correctly.
      
      Instead use the tlb_vaddr_to_host function to get the host addresses
      corresponding to the guest source and destination addresses through the
      softmmu code and fallback to the byte level code in case the
      corresponding address are not in the QEMU TLB or being examined through
      a watchpoint. As a bonus it works even for area crossing pages by
      splitting the are into chunks contained in a single page, bringing some
      performances improvements. We can therefore remove the 8-byte
      loads/stores method, as it is now quite unlikely to be used.
      
      At the same time change the name of the function to fast_memmove as it's
      not specific to mvc and use the same argument order as the C memmove
      function.
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      6da528d1
    • A
      target-s390x: mvc_fast_memset: access memory through softmmu · fc89efe6
      Aurelien Jarno 提交于
      mvc_fast_memset is bypassing the softmmu functions, getting the
      physical address using the mmu_translate function and accessing the
      corresponding physical memory. This prevents watchpoints to work
      correctly.
      
      Instead use the tlb_vaddr_to_host function to get the host address
      corresponding to the guest address through the softmmu code and fallback
      to the byte level code in case the corresponding address is not in the
      QEMU TLB or being examined through a watchpoint. As a bonus it works
      even for area crossing pages by splitting the are into chunks contained
      in a single page, bringing some performances improvements.
      
      At the same time change the name of the function to fast_memset as it's
      not specific to mvc and use the same argument order as the C memset
      function.
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      fc89efe6
    • A
      target-s390x: function to adjust the length wrt page boundary · d7ce6b7a
      Aurelien Jarno 提交于
      This patch adds a function to adjust the length of a transfer so that
      it doesn't cross a page boundary in softmmu mode. It does nothing in
      user mode.
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d7ce6b7a
  2. 05 6月, 2015 4 次提交
    • A
      target-s390x: fix MVC instruction when areas overlap · 068593de
      Aurelien Jarno 提交于
      The MVC instruction and the memmove C funtion do not have the same
      semantic when memory areas overlap:
      
      MVC: When the operands overlap, the result is obtained as if the
      operands were processed one byte at a time and each result byte were
      stored immediately after fetching the necessary operand byte.
      
      memmove: Copying takes place as though the bytes in src are first copied
      into a temporary array that does not overlap src or dest, and the bytes
      are then copied from the temporary array to dest.
      
      The behaviour is therefore the same when the destination is at a lower
      address than the source, but not in the other case. This is actually a
      trick for propagating a value to an area. While the current code detects
      that and call memset in that case, it only does for 1-byte value. This
      trick can and is used for propagating two or more bytes to an area.
      
      In the softmmu case, the call to mvc_fast_memmove is correct as the
      above tests verify that source and destination are each within a page,
      and both in a different page. The part doing the move 8 bytes by 8 bytes
      is wrong and we need to check that if the source and destination
      overlap, they do with a distance of minimum 8 bytes before copying 8
      bytes at a time.
      
      In the user code, we should check check that the destination is at a
      lower address than source or than the end of the source is at a lower
      address than the destination before calling memmove. In the opposite
      case we fallback to the same code as the softmmu one. Note that l
      represents (length - 1).
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      068593de
    • A
      target-s390x: use softmmu functions for mvcp/mvcs · a3084e80
      Aurelien Jarno 提交于
      mvcp and mvcs helper get access to the physical memory by a call to
      mmu_translate for the virtual to real conversion and then using ldb_phys
      and stb_phys to physically access the data. In practice this is quite
      slow because it bypasses the QEMU softmmu TLB and because stb_phys calls
      try to invalidate the corresponding memory for each access.
      
      Instead use cpu_ldb_{primary,secondary} for the loads and
      cpu_stb_{primary,secondary} for the stores. Ideally this should be
      further optimized by a call to memcpy, but that already improves the
      boot time of a guest by a factor 1.8.
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a3084e80
    • A
      target-s390x: implement TRANSLATE EXTENDED instruction · 3f4de675
      Aurelien Jarno 提交于
      It is part of the basic zArchitecture instructions.
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      3f4de675
    • A
      target-s390x: implement TRANSLATE AND TEST instruction · 54f00775
      Aurelien Jarno 提交于
      It is part of the basic zArchitecture instructions. Allow it to be call
      from EXECUTE.
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      54f00775
  3. 18 2月, 2015 1 次提交
  4. 04 2月, 2015 3 次提交
  5. 05 6月, 2014 2 次提交
  6. 29 5月, 2014 1 次提交
  7. 14 3月, 2014 9 次提交
  8. 11 2月, 2014 4 次提交
  9. 01 6月, 2013 1 次提交
  10. 12 4月, 2013 1 次提交
  11. 06 1月, 2013 11 次提交