Skip to content
Snippets Groups Projects
  1. Jan 07, 2021
  2. Dec 18, 2020
  3. Nov 15, 2020
  4. Nov 02, 2020
    • Peter Maydell's avatar
      disas/capstone: Fix monitor disassembly of >32 bytes · 437588d8
      Peter Maydell authored
      If we're using the capstone disassembler, disassembly of a run of
      instructions more than 32 bytes long disassembles the wrong data for
      instructions beyond the 32 byte mark:
      
      (qemu) xp /16x 0x100
      0000000000000100: 0x00000005 0x54410001 0x00000001 0x00001000
      0000000000000110: 0x00000000 0x00000004 0x54410002 0x3c000000
      0000000000000120: 0x00000000 0x00000004 0x54410009 0x74736574
      0000000000000130: 0x00000000 0x00000000 0x00000000 0x00000000
      (qemu) xp /16i 0x100
      0x00000100: 00000005 andeq r0, r0, r5
      0x00000104: 54410001 strbpl r0, [r1], #-1
      0x00000108: 00000001 andeq r0, r0, r1
      0x0000010c: 00001000 andeq r1, r0, r0
      0x00000110: 00000000 andeq r0, r0, r0
      0x00000114: 00000004 andeq r0, r0, r4
      0x00000118: 54410002 strbpl r0, [r1], #-2
      0x0000011c: 3c000000 .byte 0x00, 0x00, 0x00, 0x3c
      0x00000120: 54410001 strbpl r0, [r1], #-1
      0x00000124: 00000001 andeq r0, r0, r1
      0x00000128: 00001000 andeq r1, r0, r0
      0x0000012c: 00000000 andeq r0, r0, r0
      0x00000130: 00000004 andeq r0, r0, r4
      0x00000134: 54410002 strbpl r0, [r1], #-2
      0x00000138: 3c000000 .byte 0x00, 0x00, 0x00, 0x3c
      0x0000013c: 00000000 andeq r0, r0, r0
      
      Here the disassembly of 0x120..0x13f is using the data that is in
      0x104..0x123.
      
      This is caused by passing the wrong value to the read_memory_func().
      The intention is that at this point in the loop the 'cap_buf' buffer
      already contains 'csize' bytes of data for the instruction at guest
      addr 'pc', and we want to read in an extra 'tsize' bytes.  Those
      extra bytes are therefore at 'pc + csize', not 'pc'.  On the first
      time through the loop 'csize' happens to be zero, so the initial read
      of 32 bytes into cap_buf is correct and as long as the disassembly
      never needs to read more data we return the correct information.
      
      Use the correct guest address in the call to read_memory_func().
      
      Cc: qemu-stable@nongnu.org
      Fixes: https://bugs.launchpad.net/qemu/+bug/1900779
      
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20201022132445.25039-1-peter.maydell@linaro.org
      437588d8
  5. Oct 03, 2020
  6. Sep 17, 2020
  7. Sep 08, 2020
  8. Aug 21, 2020
  9. Jul 13, 2020
  10. Jan 29, 2020
  11. Dec 17, 2019
    • Paolo Bonzini's avatar
      libvixl: remove per-target compiler flags · 53422040
      Paolo Bonzini authored
      
      We are already including -D__STDC_LIMIT_MACROS in the global CXXFLAGS,
      so it makes sense to do the same for -D__STDC_CONSTANT_MACROS and
      -D__STDC_FORMAT_MACROS instead of limiting that to libvixl.
      
      The -Wno-sign-compare option can also be removed since GCC 4.6 is not
      supported anymore.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      53422040
  12. Oct 04, 2019
  13. Aug 21, 2019
    • Paul A. Clarke's avatar
      ppc: Add support for 'mffsl' instruction · 31eb7ddd
      Paul A. Clarke authored
      
      ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR)
      instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl.
      This patch adds support for 'mffsl'.
      
      'mffsl' is identical to 'mffs', except it only returns mode, status, and enable
      bits from the FPSCR.
      
      On CPUs without support for 'mffsl' (below ISA 3.0), the 'mffsl' instruction
      will execute identically to 'mffs'.
      
      Note: I renamed FPSCR_RN to FPSCR_RN0 so I could create an FPSCR_RN mask which
      is both bits of the FPSCR rounding mode, as defined in the ISA.
      
      I also fixed a typo in the definition of FPSCR_FR.
      
      Signed-off-by: default avatarPaul A. Clarke <pc@us.ibm.com>
      
      v4:
      - nit: added some braces to resolve a checkpatch complaint.
      
      v3:
      - Changed tcg_gen_and_i64 to tcg_gen_andi_i64, eliminating the need for a
        temporary, per review from Richard Henderson.
      
      v2:
      - I found that I copied too much of the 'mffs' implementation.
        The 'Rc' condition code bits are not needed for 'mffsl'.  Removed.
      - I now free the (renamed) 'tmask' temporary.
      - I now bail early for older ISA to the original 'mffs' implementation.
      
      Message-Id: <1565982203-11048-1-git-send-email-pc@us.ibm.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      31eb7ddd
  14. Jun 27, 2019
  15. Jun 12, 2019
    • Markus Armbruster's avatar
      Include qemu-common.h exactly where needed · a8d25326
      Markus Armbruster authored
      
      No header includes qemu-common.h after this commit, as prescribed by
      qemu-common.h's file comment.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190523143508.25387-5-armbru@redhat.com>
      [Rebased with conflicts resolved automatically, except for
      include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c
      block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c
      target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h
      target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h
      target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h
      target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and
      net/tap-bsd.c fixed up]
      a8d25326
  16. May 13, 2019
  17. Apr 18, 2019
  18. Mar 19, 2019
  19. Mar 05, 2019
  20. Feb 27, 2019
  21. Jan 24, 2019
  22. Jan 11, 2019
  23. Jan 03, 2019
Loading