1. 18 12月, 2017 1 次提交
  2. 08 11月, 2017 2 次提交
  3. 27 10月, 2017 1 次提交
    • I
      sh4: simplify superh_cpu_class_by_name() · d5ebe625
      Igor Mammedov 提交于
      currently for sh4 cpu_model argument for '-cpu' option
      could be either 'cpu model' name or cpu_typename.
      
      however typically '-cpu' takes 'cpu model' name and
      cpu type for sh4 target isn't advertised publicly
      ('-cpu help' prints only 'cpu model' names) so we
      shouldn't care about this use case (it's more of a bug).
      
      1. Drop '-cpu cpu_typename' to align with the rest of
         targets.
      2. Compose searched for typename from cpu model and use
         it with object_class_by_name() directly instead of
         over-complicated
             object_class_get_list()
             g_slist_find_custom() + superh_cpu_name_compare()
      
      With #1 droped, #2 could be used for both lookups which
      simplifies superh_cpu_class_by_name() quite a bit.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Acked-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <1507211474-188400-23-git-send-email-imammedo@redhat.com>
      [ehabkost: Include fixup sent by Igor]
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      d5ebe625
  4. 25 10月, 2017 3 次提交
    • E
      tcg: introduce regions to split code_gen_buffer · e8feb96f
      Emilio G. Cota 提交于
      This is groundwork for supporting multiple TCG contexts.
      
      The naive solution here is to split code_gen_buffer statically
      among the TCG threads; this however results in poor utilization
      if translation needs are different across TCG threads.
      
      What we do here is to add an extra layer of indirection, assigning
      regions that act just like pages do in virtual memory allocation.
      (BTW if you are wondering about the chosen naming, I did not want
      to use blocks or pages because those are already heavily used in QEMU).
      
      We use a global lock to serialize allocations as well as statistics
      reporting (we now export the size of the used code_gen_buffer with
      tcg_code_size()). Note that for the allocator we could just use
      a counter and atomic_inc; however, that would complicate the gathering
      of tcg_code_size()-like stats. So given that the region operations are
      not a fast path, a lock seems the most reasonable choice.
      
      The effectiveness of this approach is clear after seeing some numbers.
      I used the bootup+shutdown of debian-arm with '-tb-size 80' as a benchmark.
      Note that I'm evaluating this after enabling per-thread TCG (which
      is done by a subsequent commit).
      
      * -smp 1, 1 region (entire buffer):
          qemu: flush code_size=83885014 nb_tbs=154739 avg_tb_size=357
          qemu: flush code_size=83884902 nb_tbs=153136 avg_tb_size=363
          qemu: flush code_size=83885014 nb_tbs=152777 avg_tb_size=364
          qemu: flush code_size=83884950 nb_tbs=150057 avg_tb_size=373
          qemu: flush code_size=83884998 nb_tbs=150234 avg_tb_size=373
          qemu: flush code_size=83885014 nb_tbs=154009 avg_tb_size=360
          qemu: flush code_size=83885014 nb_tbs=151007 avg_tb_size=370
          qemu: flush code_size=83885014 nb_tbs=151816 avg_tb_size=367
      
      That is, 8 flushes.
      
      * -smp 8, 32 regions (80/32 MB per region) [i.e. this patch]:
      
          qemu: flush code_size=76328008 nb_tbs=141040 avg_tb_size=356
          qemu: flush code_size=75366534 nb_tbs=138000 avg_tb_size=361
          qemu: flush code_size=76864546 nb_tbs=140653 avg_tb_size=361
          qemu: flush code_size=76309084 nb_tbs=135945 avg_tb_size=375
          qemu: flush code_size=74581856 nb_tbs=132909 avg_tb_size=375
          qemu: flush code_size=73927256 nb_tbs=135616 avg_tb_size=360
          qemu: flush code_size=78629426 nb_tbs=142896 avg_tb_size=365
          qemu: flush code_size=76667052 nb_tbs=138508 avg_tb_size=368
      
      Again, 8 flushes. Note how buffer utilization is not 100%, but it
      is close. Smaller region sizes would yield higher utilization,
      but we want region allocation to be rare (it acquires a lock), so
      we do not want to go too small.
      
      * -smp 8, static partitioning of 8 regions (10 MB per region):
          qemu: flush code_size=21936504 nb_tbs=40570 avg_tb_size=354
          qemu: flush code_size=11472174 nb_tbs=20633 avg_tb_size=370
          qemu: flush code_size=11603976 nb_tbs=21059 avg_tb_size=365
          qemu: flush code_size=23254872 nb_tbs=41243 avg_tb_size=377
          qemu: flush code_size=28289496 nb_tbs=52057 avg_tb_size=358
          qemu: flush code_size=43605160 nb_tbs=78896 avg_tb_size=367
          qemu: flush code_size=45166552 nb_tbs=82158 avg_tb_size=364
          qemu: flush code_size=63289640 nb_tbs=116494 avg_tb_size=358
          qemu: flush code_size=51389960 nb_tbs=93937 avg_tb_size=362
          qemu: flush code_size=59665928 nb_tbs=107063 avg_tb_size=372
          qemu: flush code_size=38380824 nb_tbs=68597 avg_tb_size=374
          qemu: flush code_size=44884568 nb_tbs=79901 avg_tb_size=376
          qemu: flush code_size=50782632 nb_tbs=90681 avg_tb_size=374
          qemu: flush code_size=39848888 nb_tbs=71433 avg_tb_size=372
          qemu: flush code_size=64708840 nb_tbs=119052 avg_tb_size=359
          qemu: flush code_size=49830008 nb_tbs=90992 avg_tb_size=362
          qemu: flush code_size=68372408 nb_tbs=123442 avg_tb_size=368
          qemu: flush code_size=33555560 nb_tbs=59514 avg_tb_size=378
          qemu: flush code_size=44748344 nb_tbs=80974 avg_tb_size=367
          qemu: flush code_size=37104248 nb_tbs=67609 avg_tb_size=364
      
      That is, 20 flushes. Note how a static partitioning approach uses
      the code buffer poorly, leading to many unnecessary flushes.
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: NEmilio G. Cota <cota@braap.org>
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      e8feb96f
    • E
      tcg: define tcg_init_ctx and make tcg_ctx a pointer · b1311c4a
      Emilio G. Cota 提交于
      Groundwork for supporting multiple TCG contexts.
      
      The core of this patch is this change to tcg/tcg.h:
      
      > -extern TCGContext tcg_ctx;
      > +extern TCGContext tcg_init_ctx;
      > +extern TCGContext *tcg_ctx;
      
      Note that for now we set *tcg_ctx to whatever TCGContext is passed
      to tcg_context_init -- in this case &tcg_init_ctx.
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NEmilio G. Cota <cota@braap.org>
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      b1311c4a
    • E
      tcg: take tb_ctx out of TCGContext · 44ded3d0
      Emilio G. Cota 提交于
      Groundwork for supporting multiple TCG contexts.
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: NEmilio G. Cota <cota@braap.org>
      Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
      44ded3d0
  5. 18 10月, 2017 1 次提交
  6. 16 10月, 2017 1 次提交
    • R
      linux-user: Tidy and enforce reserved_va initialization · 18e80c55
      Richard Henderson 提交于
      We had a check using TARGET_VIRT_ADDR_SPACE_BITS to make sure
      that the allocation coming in from the command-line option was
      not too large, but that didn't include target-specific knowledge
      about other restrictions on user-space.
      
      Remove several target-specific hacks in linux-user/main.c.
      
      For MIPS and Nios, we can replace them with proper adjustments
      to the respective target's TARGET_VIRT_ADDR_SPACE_BITS definition.
      
      For ARM, we had no existing ifdef but I suspect that the current
      default value of 0xf7000000 was chosen with this in mind.  Define
      a workable value in linux-user/arm/, and also document why the
      special case is required.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20170708025030.15845-3-rth@twiddle.net>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      18e80c55
  7. 19 9月, 2017 1 次提交
  8. 08 8月, 2017 1 次提交
    • E
      maint: Include bug-reporting info in --help output · f5048cb7
      Eric Blake 提交于
      These days, many programs are including a bug-reporting address,
      or better yet, a link to the project web site, at the tail of
      their --help output.  However, we were not very consistent at
      doing so: only qemu-nbd and qemu-qa mentioned anything, with the
      latter pointing to an individual person instead of the project.
      
      Add a new #define that sets up a uniform string, mentioning both
      bug reporting instructions and overall project details, and which
      a downstream vendor could tweak if they want bugs to go to a
      downstream database.  Then use it in all of our binaries which
      have --help output.
      
      The canned text intentionally references http:// instead of https://
      because our https website currently causes certificate errors in
      some browsers.  That can be tweaked later once we have resolved the
      web site issued.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20170803163353.19558-5-eblake@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f5048cb7
  9. 19 7月, 2017 1 次提交
  10. 07 5月, 2017 1 次提交
  11. 04 5月, 2017 1 次提交
    • S
      target/openrisc: implement shadow registers · d89e71e8
      Stafford Horne 提交于
      Shadow registers are part of the openrisc spec along with sr[cid], as
      part of the fast context switching feature.  When exceptions occur,
      instead of having to save registers to the stack if enabled the CID will
      increment and a new set of registers will be available.
      
      This patch only implements shadow registers which can be used as extra
      scratch registers via the mfspr and mtspr if required.  This is
      implemented in a way where it would be easy to add on the fast context
      switching, currently cid is hardcoded to 0.
      
      This is need for openrisc linux smp kernels to boot correctly.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      d89e71e8
  12. 28 2月, 2017 1 次提交
  13. 22 2月, 2017 1 次提交
  14. 14 2月, 2017 2 次提交
  15. 01 2月, 2017 1 次提交
  16. 27 1月, 2017 1 次提交
  17. 25 1月, 2017 1 次提交
  18. 24 1月, 2017 1 次提交
  19. 23 1月, 2017 1 次提交
  20. 19 1月, 2017 1 次提交
  21. 28 12月, 2016 1 次提交
  22. 26 10月, 2016 4 次提交
  23. 24 10月, 2016 2 次提交
  24. 21 10月, 2016 1 次提交
  25. 12 10月, 2016 1 次提交
    • D
      trace: provide mechanism for registering trace events · fe4db84d
      Daniel P. Berrange 提交于
      Remove the notion of there being a single global array
      of trace events, by introducing a method for registering
      groups of events.
      
      The module_call_init() needs to be invoked at the start
      of any program that wants to make use of the trace
      support. Currently this covers system emulators qemu-nbd,
      qemu-img and qemu-io.
      
      [Squashed the following fix from Daniel P. Berrange
      <berrange@redhat.com>:
      
      linux-user/bsd-user: initialize trace events subsystem
      
      The bsd-user/linux-user programs make use of the CPU emulation
      code and this now requires that the trace events subsystem
      is enabled, otherwise it'll crash trying to allocate an empty
      trace events bitmap for the CPU object.
      
      --Stefan]
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1475588159-30598-14-git-send-email-berrange@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      fe4db84d
  26. 29 9月, 2016 1 次提交
  27. 27 9月, 2016 5 次提交
  28. 23 9月, 2016 1 次提交