1. 10 6月, 2019 1 次提交
  2. 11 5月, 2019 1 次提交
  3. 26 4月, 2019 2 次提交
  4. 19 4月, 2019 4 次提交
    • M
      qom/cpu: Simplify how CPUClass:cpu_dump_state() prints · 90c84c56
      Markus Armbruster 提交于
      CPUClass method dump_statistics() takes an fprintf()-like callback and
      a FILE * to pass to it.  Most callers pass fprintf() and stderr.
      log_cpu_state() passes fprintf() and qemu_log_file.
      hmp_info_registers() passes monitor_fprintf() and the current monitor
      cast to FILE *.  monitor_fprintf() casts it right back, and is
      otherwise identical to monitor_printf().
      
      The callback gets passed around a lot, which is tiresome.  The
      type-punning around monitor_fprintf() is ugly.
      
      Drop the callback, and call qemu_fprintf() instead.  Also gets rid of
      the type-punning, since qemu_fprintf() takes NULL instead of the
      current monitor cast to FILE *.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20190417191805.28198-15-armbru@redhat.com>
      90c84c56
    • M
      qom/cpu: Simplify how CPUClass::dump_statistics() prints · 11cb6c15
      Markus Armbruster 提交于
      CPUClass method dump_statistics() takes an fprintf()-like callback and
      a FILE * to pass to it.
      
      Its only caller hmp_info_cpustats() (via cpu_dump_statistics()) passes
      monitor_fprintf() and the current monitor cast to FILE *.
      monitor_fprintf() casts it right back, and is otherwise identical to
      monitor_printf().  The type-punning is ugly.
      
      Drop the callback, and call qemu_printf() instead.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20190417191805.28198-13-armbru@redhat.com>
      11cb6c15
    • M
      target: Clean up how the dump_mmu() print · fad866da
      Markus Armbruster 提交于
      The various dump_mmu() take an fprintf()-like callback and a FILE * to
      pass to it, and so do their helper functions.  Passing around callback
      and argument is rather tiresome.
      
      Most dump_mmu() are called only by the target's hmp_info_tlb().  These
      all pass monitor_printf() cast to fprintf_function and the current
      monitor cast to FILE *.
      
      SPARC's dump_mmu() gets also called from target/sparc/ldst_helper.c a
      few times #ifdef DEBUG_MMU.  These calls pass fprintf() and stdout.
      
      The type-punning is technically undefined behaviour, but works in
      practice.  Clean up: drop the callback, and call qemu_printf()
      instead.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20190417191805.28198-11-armbru@redhat.com>
      fad866da
    • M
      target: Simplify how the TARGET_cpu_list() print · 0442428a
      Markus Armbruster 提交于
      The various TARGET_cpu_list() take an fprintf()-like callback and a
      FILE * to pass to it.  Their callers (vl.c's main() via list_cpus(),
      bsd-user/main.c's main(), linux-user/main.c's main()) all pass
      fprintf() and stdout.  Thus, the flexibility provided by the (rather
      tiresome) indirection isn't actually used.
      
      Drop the callback, and call qemu_printf() instead.
      
      Calling printf() would also work, but would make the code unsuitable
      for monitor context without making it simpler.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190417191805.28198-10-armbru@redhat.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      0442428a
  5. 29 3月, 2019 1 次提交
  6. 12 3月, 2019 8 次提交
  7. 26 2月, 2019 6 次提交
  8. 18 2月, 2019 2 次提交
  9. 17 2月, 2019 1 次提交
    • F
      target/ppc: Enable reporting of SPRs to GDB · 707c7c2e
      Fabiano Rosas 提交于
      This allows reading and writing of SPRs via GDB:
      
      (gdb) p/x $srr1
      $1 = 0x8000000002803033
      
      (gdb) p/x $pvr
      $2 = 0x4b0201
      (gdb) set $pvr=0x4b0000
      (gdb) p/x $pvr
      $3 = 0x4b0000
      
      The `info` command can also be used:
      (gdb) info registers spr
      
      For this purpose, GDB needs to be provided with an XML description of
      the registers (see the gdb-xml directory for examples) and a set of
      callbacks for reading and writing the registers must be defined.
      
      The XML file in this case is created dynamically, based on the SPRs
      already defined in the machine. This way we avoid the need for several
      XML files to suit each possible ppc machine.
      
      The gdb_{get,set}_spr_reg callbacks take an index based on the order
      the registers appear in the XML file. This index does not match the
      actual location of the registers in the env->spr array so the
      gdb_find_spr_idx function does that conversion.
      
      Note: GDB currently needs to know the guest endianness in order to
      properly print the registers values. This is done automatically by GDB
      when provided with the ELF file or explicitly with the `set endian
      <big|little>` command.
      Signed-off-by: NFabiano Rosas <farosas@linux.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      707c7c2e
  10. 04 2月, 2019 1 次提交
  11. 22 1月, 2019 1 次提交
    • T
      ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode · 0d8d6a24
      Thomas Huth 提交于
      When compiling the ppc code with clang and -std=gnu99, there are a
      couple of warnings/errors like this one:
      
        CC      ppc64-softmmu/hw/intc/xics.o
      In file included from hw/intc/xics.c:35:
      include/hw/ppc/xics.h:43:25: error: redefinition of typedef 'ICPState' is a C11 feature
            [-Werror,-Wtypedef-redefinition]
      typedef struct ICPState ICPState;
                              ^
      target/ppc/cpu.h:1181:25: note: previous definition is here
      typedef struct ICPState ICPState;
                              ^
      Work around the problems by including the proper headers in spapr.h
      and by using struct forward declarations in cpu.h.
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      0d8d6a24
  12. 09 1月, 2019 4 次提交
  13. 21 12月, 2018 2 次提交
  14. 08 11月, 2018 1 次提交
    • R
      target/ppc: add external PID support · 50728199
      Roman Kapl 提交于
      External PID is a mechanism present on BookE 2.06 that enables application to
      store/load data from different address spaces. There are special version of some
      instructions, which operate on alternate address space, which is specified in
      the EPLC/EPSC regiser.
      
      This implementation uses two additional MMU modes (mmu_idx) to provide the
      address space for the load and store instructions. The QEMU TLB fill code was
      modified to recognize these MMU modes and use the values in EPLC/EPSC to find
      the proper entry in he PPC TLB. These two QEMU TLBs are also flushed on each
      write to EPLC/EPSC.
      
      Following instructions are implemented: dcbfep dcbstep dcbtep dcbtstep dcbzep
      dcbzlep icbiep lbepx ldepx lfdepx lhepx lwepx stbepx stdepx stfdepx sthepx
      stwepx.
      
      Following vector instructions are not: evlddepx evstddepx lvepx lvepxl stvepx
      stvepxl.
      Signed-off-by: NRoman Kapl <rka@sysgo.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      50728199
  15. 28 8月, 2018 1 次提交
  16. 21 8月, 2018 1 次提交
  17. 03 7月, 2018 2 次提交
  18. 21 6月, 2018 1 次提交
    • D
      target/ppc: Allow cpu compatiblity checks based on type, not instance · ad99d04c
      David Gibson 提交于
      ppc_check_compat() is used in a number of places to check if a cpu object
      supports a certain compatiblity mode, subject to various constraints.
      
      It takes a PowerPCCPU *, however it really only depends on the cpu's class.
      We have upcoming cases where it would be useful to make compatibility
      checks before we fully instantiate the cpu objects.
      
      ppc_type_check_compat() will now make an equivalent check, but based on a
      CPU's QOM typename instead of an instantiated CPU object.
      
      We make use of the new interface in several places in spapr, where we're
      essentially making a global check, rather than one specific to a particular
      cpu.  This avoids some ugly uses of first_cpu to grab a "representative"
      instance.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NCédric Le Goater <clg@kaod.org>
      ad99d04c