1. 16 2月, 2017 1 次提交
  2. 08 2月, 2017 1 次提交
  3. 01 2月, 2017 1 次提交
  4. 28 1月, 2017 1 次提交
  5. 20 1月, 2017 1 次提交
  6. 16 1月, 2017 1 次提交
  7. 13 1月, 2017 2 次提交
    • A
      cpu_common_reset: wrap TCG specific code in tcg_enabled() · ba7d3d18
      Alex Bennée 提交于
      Both the cpu->tb_jmp_cache and SoftMMU TLB structures are only used
      when running TCG code so we might as well skip them for anything else.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      ba7d3d18
    • A
      qom/cpu: move tlb_flush to cpu_common_reset · 1f5c00cf
      Alex Bennée 提交于
      It is a common thing amongst the various cpu reset functions want to
      flush the SoftMMU's TLB entries. This is done either by calling
      tlb_flush directly or by way of a general memset of the CPU
      structure (sometimes both).
      
      This moves the tlb_flush call to the common reset function and
      additionally ensures it is only done for the CONFIG_SOFTMMU case and
      when tcg is enabled.
      
      In some target cases we add an empty end_of_reset_fields structure to the
      target vCPU structure so have a clear end point for any memset which
      is resetting value in the structure before CPU_COMMON (where the TLB
      structures are).
      
      While this is a nice clean-up in general it is also a precursor for
      changes coming to cputlb for MTTCG where the clearing of entries
      can't be done arbitrarily across vCPUs. Currently the cpu_reset
      function is usually called from the context of another vCPU as the
      architectural power up sequence is run. By using the cputlb API
      functions we can ensure the right behaviour in the future.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      1f5c00cf
  8. 25 10月, 2016 2 次提交
  9. 12 10月, 2016 1 次提交
  10. 04 10月, 2016 2 次提交
  11. 29 9月, 2016 2 次提交
  12. 20 9月, 2016 1 次提交
    • M
      linux-user-i386: Fix crash on cpuid · fa5376dd
      Marc-André Lureau 提交于
      Running cpuid instructions with a simple run like:
      i386-linux-user/qemu-i386 tests/tcg/sha1-i386
      
      Results in the following assert:
       #0  0x00007ffff64246f5 in raise () from /lib64/libc.so.6
       #1  0x00007ffff64262fa in abort () from /lib64/libc.so.6
       #2  0x00007ffff7937ec5 in g_assertion_message () from /lib64/libglib-2.0.so.0
       #3  0x00007ffff7937f5a in g_assertion_message_expr () from /lib64/libglib-2.0.so.0
       #4  0x000055555561b54c in apicid_bitwidth_for_count (count=0) at /home/elmarco/src/qemu/include/hw/i386/topology.h:58
       #5  0x000055555561b58a in apicid_smt_width (nr_cores=0, nr_threads=0) at /home/elmarco/src/qemu/include/hw/i386/topology.h:67
       #6  0x000055555561b5c3 in apicid_core_offset (nr_cores=0, nr_threads=0) at /home/elmarco/src/qemu/include/hw/i386/topology.h:82
       #7  0x000055555561b5e3 in apicid_pkg_offset (nr_cores=0, nr_threads=0) at /home/elmarco/src/qemu/include/hw/i386/topology.h:89
       #8  0x000055555561dd86 in cpu_x86_cpuid (env=0x555557999550, index=4, count=3, eax=0x7fffffffcae8, ebx=0x7fffffffcaec, ecx=0x7fffffffcaf0, edx=0x7fffffffcaf4) at /home/elmarco/src/qemu/target-i386/cpu.c:2405
       #9  0x0000555555638e8e in helper_cpuid (env=0x555557999550) at /home/elmarco/src/qemu/target-i386/misc_helper.c:106
       #10 0x000055555599dc5e in static_code_gen_buffer ()
       #11 0x00005555555952f8 in cpu_tb_exec (cpu=0x5555579912d0, itb=0x7ffff4371ab0) at /home/elmarco/src/qemu/cpu-exec.c:166
       #12 0x0000555555595c8e in cpu_loop_exec_tb (cpu=0x5555579912d0, tb=0x7ffff4371ab0, last_tb=0x7fffffffd088, tb_exit=0x7fffffffd084, sc=0x7fffffffd0a0) at /home/elmarco/src/qemu/cpu-exec.c:517
       #13 0x0000555555595e50 in cpu_exec (cpu=0x5555579912d0) at /home/elmarco/src/qemu/cpu-exec.c:612
       #14 0x00005555555c065b in cpu_loop (env=0x555557999550) at /home/elmarco/src/qemu/linux-user/main.c:297
       #15 0x00005555555c25b2 in main (argc=2, argv=0x7fffffffd848, envp=0x7fffffffd860) at /home/elmarco/src/qemu/linux-user/main.c:4803
      
      The fields are set in qemu_init_vcpu() with softmmu, but it's a stub
      with linux-user.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      fa5376dd
  13. 27 7月, 2016 1 次提交
  14. 19 7月, 2016 1 次提交
  15. 08 7月, 2016 3 次提交
    • I
      pc: Parse CPU features only once · 6aff24c6
      Igor Mammedov 提交于
      Considering that features are converted to global properties and
      global properties are automatically applied to every new instance
      of created CPU (at object_new() time), there is no point in
      parsing cpu_model string every time a CPU created. So move
      parsing outside CPU creation loop and do it only once.
      
      Parsing also should be done before any CPU is created so that
      features would affect the first CPU a well.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      6aff24c6
    • I
      arm: virt: Parse cpu_model only once · 09f71b05
      Igor Mammedov 提交于
      Considering that features are converted to global properties and
      global properties are automatically applied to every new instance
      of created CPU (at object_new() time), there is no point in
      parsing cpu_model string every time a CPU created. So move
      parsing outside CPU creation loop and do it only once.
      
      Parsing also should be done before any CPU is created so that
      features would affect the first CPU a well.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      09f71b05
    • I
      cpu: Use CPUClass->parse_features() as convertor to global properties · 62a48a2a
      Igor Mammedov 提交于
      Currently CPUClass->parse_features() is used to parse -cpu
      features string and set properties on created CPU instances.
      
      But considering that features specified by -cpu apply to every
      created CPU instance, it doesn't make sense to parse the same
      features string for every CPU created. It also makes every target
      that cares about parsing features string explicitly call
      CPUClass->parse_features() parser, which gets in a way if we
      consider using generic device_add for CPU hotplug as device_add
      has not a clue about CPU specific hooks.
      
      Turns out we can use global properties mechanism to set
      properties on every created CPU instance for a given type. That
      way it's possible to convert CPU features into a set of global
      properties for CPU type specified by -cpu cpu_model and common
      Device.device_post_init() will apply them to CPU of given type
      automatically regardless whether it's manually created CPU or CPU
      created with help of device_add.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      62a48a2a
  16. 13 5月, 2016 1 次提交
  17. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  18. 23 2月, 2016 1 次提交
  19. 11 2月, 2016 1 次提交
  20. 03 2月, 2016 1 次提交
  21. 15 1月, 2016 1 次提交
  22. 16 9月, 2015 1 次提交
  23. 09 9月, 2015 2 次提交
  24. 15 8月, 2015 1 次提交
    • P
      exec: drop cpu_can_do_io, just read cpu->can_do_io · 414b15c9
      Paolo Bonzini 提交于
      After commit 626cf8f4 (icount: set can_do_io outside TB execution,
      2014-12-08), can_do_io is set to 1 if not executing code.  It is
      no longer necessary to make this assumption in cpu_can_do_io.
      
      It is also possible to remove the use_icount test, simply by
      never setting cpu->can_do_io to 0 unless use_icount is true.
      
      With these changes cpu_can_do_io boils down to a read of
      cpu->can_do_io.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      414b15c9
  25. 09 7月, 2015 2 次提交
  26. 19 3月, 2015 1 次提交
  27. 18 2月, 2015 1 次提交
  28. 21 12月, 2014 1 次提交
  29. 02 11月, 2014 1 次提交
  30. 26 9月, 2014 2 次提交
  31. 12 9月, 2014 1 次提交