1. 01 6月, 2018 3 次提交
  2. 23 5月, 2018 1 次提交
  3. 22 5月, 2018 3 次提交
  4. 20 5月, 2018 2 次提交
  5. 15 5月, 2018 6 次提交
  6. 11 5月, 2018 1 次提交
  7. 10 5月, 2018 1 次提交
  8. 09 5月, 2018 1 次提交
  9. 17 4月, 2018 1 次提交
  10. 11 4月, 2018 1 次提交
    • P
      icount: fix cpu_restore_state_from_tb for non-tb-exit cases · afd46fca
      Pavel Dovgalyuk 提交于
      In icount mode, instructions that access io memory spaces in the middle
      of the translation block invoke TB recompilation.  After recompilation,
      such instructions become last in the TB and are allowed to access io
      memory spaces.
      
      When the code includes instruction like i386 'xchg eax, 0xffffd080'
      which accesses APIC, QEMU goes into an infinite loop of the recompilation.
      
      This instruction includes two memory accesses - one read and one write.
      After the first access, APIC calls cpu_report_tpr_access, which restores
      the CPU state to get the current eip.  But cpu_restore_state_from_tb
      resets the cpu->can_do_io flag which makes the second memory access invalid.
      Therefore the second memory access causes a recompilation of the block.
      Then these operations repeat again and again.
      
      This patch moves resetting cpu->can_do_io flag from
      cpu_restore_state_from_tb to cpu_loop_exit* functions.
      
      It also adds a parameter for cpu_restore_state which controls restoring
      icount.  There is no need to restore icount when we only query CPU state
      without breaking the TB.  Restoring it in such cases leads to the
      incorrect flow of the virtual time.
      
      In most cases new parameter is true (icount should be recalculated).
      But there are two cases in i386 and openrisc when the CPU state is only
      queried without the need to break the TB.  This patch fixes both of
      these cases.
      Signed-off-by: NPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
      Message-Id: <20180409091320.12504.35329.stgit@pasha-VirtualBox>
      [rth: Make can_do_io setting unconditional; move from cpu_exec;
      make cpu_loop_exit_{noexc,restore} call cpu_loop_exit.]
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      afd46fca
  11. 09 4月, 2018 4 次提交
  12. 05 4月, 2018 1 次提交
    • A
      target/i386: Fix andn instruction · 5cd10051
      Alexandro Sanchez Bach 提交于
      In commit 7073fbad, the `andn` instruction
      was implemented via `tcg_gen_andc` but passes the operands in the wrong
      order:
      - X86 defines `andn dest,src1,src2` as: dest = ~src1 & src2
      - TCG defines `andc dest,src1,src2` as: dest = src1 & ~src2
      
      The following simple test shows the issue:
      
          #include <stdio.h>
          #include <stdint.h>
      
          int main(void) {
              uint32_t ret = 0;
              __asm (
                  "mov $0xFF00, %%ecx\n"
                  "mov $0x0F0F, %%eax\n"
                  "andn %%ecx, %%eax, %%ecx\n"
                  "mov %%ecx, %0\n"
                : "=r" (ret));
              printf("%08X\n", ret);
              return 0;
          }
      
      This patch fixes the problem by simply swapping the order of the two last
      arguments in `tcg_gen_andc_tl`.
      Reported-by: NAlexandro Sanchez Bach <alexandro@phi.nz>
      Signed-off-by: NAlexandro Sanchez Bach <alexandro@phi.nz>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5cd10051
  13. 03 4月, 2018 1 次提交
  14. 27 3月, 2018 1 次提交
  15. 26 3月, 2018 3 次提交
  16. 20 3月, 2018 6 次提交
  17. 14 3月, 2018 4 次提交