Skip to content
Snippets Groups Projects
  1. Jan 24, 2020
  2. Jan 07, 2020
  3. Dec 18, 2019
  4. Dec 17, 2019
  5. Nov 12, 2019
  6. Oct 14, 2019
  7. Aug 21, 2019
  8. Aug 16, 2019
    • Markus Armbruster's avatar
      Clean up inclusion of sysemu/sysemu.h · d5938f29
      Markus Armbruster authored
      
      In my "build everything" tree, changing sysemu/sysemu.h triggers a
      recompile of some 5400 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).
      
      Almost a third of its inclusions are actually superfluous.  Delete
      them.  Downgrade two more to qapi/qapi-types-run-state.h, and move one
      from char/serial.h to char/serial.c.
      
      hw/semihosting/config.c, monitor/monitor.c, qdev-monitor.c, and
      stubs/semihost.c define variables declared in sysemu/sysemu.h without
      including it.  The compiler is cool with that, but include it anyway.
      
      This doesn't reduce actual use much, as it's still included into
      widely included headers.  The next commit will tackle that.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      Message-Id: <20190812052359.30071-27-armbru@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      d5938f29
    • Markus Armbruster's avatar
      Include hw/qdev-properties.h less · a27bd6c7
      Markus Armbruster authored
      
      In my "build everything" tree, changing hw/qdev-properties.h triggers
      a recompile of some 2700 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).
      
      Many places including hw/qdev-properties.h (directly or via hw/qdev.h)
      actually need only hw/qdev-core.h.  Include hw/qdev-core.h there
      instead.
      
      hw/qdev.h is actually pointless: all it does is include hw/qdev-core.h
      and hw/qdev-properties.h, which in turn includes hw/qdev-core.h.
      Replace the remaining uses of hw/qdev.h by hw/qdev-properties.h.
      
      While there, delete a few superfluous inclusions of hw/qdev-core.h.
      
      Touching hw/qdev-properties.h now recompiles some 1200 objects.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Daniel P. Berrangé" <berrange@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20190812052359.30071-22-armbru@redhat.com>
      a27bd6c7
    • Markus Armbruster's avatar
      Include qemu/main-loop.h less · db725815
      Markus Armbruster authored
      
      In my "build everything" tree, changing qemu/main-loop.h triggers a
      recompile of some 5600 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).  It includes block/aio.h,
      which in turn includes qemu/event_notifier.h, qemu/notify.h,
      qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h,
      qemu/thread.h, qemu/timer.h, and a few more.
      
      Include qemu/main-loop.h only where it's needed.  Touching it now
      recompiles only some 1700 objects.  For block/aio.h and
      qemu/event_notifier.h, these numbers drop from 5600 to 2800.  For the
      others, they shrink only slightly.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-21-armbru@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      db725815
    • Markus Armbruster's avatar
      Clean up inclusion of exec/cpu-common.h · 6a0acfff
      Markus Armbruster authored
      
      migration/qemu-file.h neglects to include it even though it needs
      ram_addr_t.  Fix that.  Drop a few superfluous inclusions elsewhere.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20190812052359.30071-14-armbru@redhat.com>
      6a0acfff
    • Markus Armbruster's avatar
      trace: Do not include qom/cpu.h into generated trace.h · 13d4ff07
      Markus Armbruster authored
      
      docs/devel/tracing.txt explains "since many source files include
      trace.h, [the generated trace.h use] a minimum of types and other
      header files included to keep the namespace clean and compile times
      and dependencies down."
      
      Commit 48151859 "trace: Add per-vCPU tracing states for events with
      the 'vcpu' property" made them all include qom/cpu.h via
      control-internal.h.  qom/cpu.h in turn includes about thirty headers.
      Ouch.
      
      Per-vCPU tracing is currently not supported in sub-directories'
      trace-events.  In other words, qom/cpu.h can only be used in
      trace-root.h, not in any trace.h.
      
      Split trace/control-vcpu.h off trace/control.h and
      trace/control-internal.h.  Have the generated trace.h include
      trace/control.h (which no longer includes qom/cpu.h), and trace-root.h
      include trace/control-vcpu.h (which includes it).
      
      The resulting improvement is a bit disappointing: in my "build
      everything" tree, some 1100 out of 6600 objects (not counting tests
      and objects that don't depend on qemu/osdep.h) depend on a trace.h,
      and about 600 of them no longer depend on qom/cpu.h.  But more than
      1300 others depend on trace-root.h.  More work is clearly needed.
      Left for another day.
      
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20190812052359.30071-8-armbru@redhat.com>
      13d4ff07
  9. Jul 29, 2019
  10. Jul 02, 2019
  11. 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
  12. Jun 11, 2019
    • Markus Armbruster's avatar
      qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h · 14a48c1d
      Markus Armbruster authored
      
      Other accelerators have their own headers: sysemu/hax.h, sysemu/hvf.h,
      sysemu/kvm.h, sysemu/whpx.h.  Only tcg_enabled() & friends sit in
      qemu-common.h.  This necessitates inclusion of qemu-common.h into
      headers, which is against the rules spelled out in qemu-common.h's
      file comment.
      
      Move tcg_enabled() & friends into their own header sysemu/tcg.h, and
      adjust #include directives.
      
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190523143508.25387-2-armbru@redhat.com>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      [Rebased with conflicts resolved automatically, except for
      accel/tcg/tcg-all.c]
      14a48c1d
  13. Jun 10, 2019
  14. May 24, 2019
    • Philippe Mathieu-Daudé's avatar
      qom/object: Display more helpful message when an object type is missing · e02bdf1c
      Philippe Mathieu-Daudé authored
      
      When writing a new board, adding device which uses other devices
      (container) or simply refactoring, one can discover the hard way
      his machine misses some devices. In the case of containers, the
      error is not obvious:
      
        $ qemu-system-microblaze -M xlnx-zynqmp-pmu
        **
        ERROR:/source/qemu/qom/object.c:454:object_initialize_with_type: assertion failed: (type != NULL)
        Aborted (core dumped)
      
      And we have to look at the coredump to figure the error:
      
        (gdb) bt
        #1  0x00007f84773cf895 in abort () at /lib64/libc.so.6
        #2  0x00007f847961fb53 in  () at /lib64/libglib-2.0.so.0
        #3  0x00007f847967a4de in g_assertion_message_expr () at /lib64/libglib-2.0.so.0
        #4  0x000055c4bcac6c11 in object_initialize_with_type (data=data@entry=0x55c4bdf239e0, size=size@entry=2464, type=<optimized out>) at /source/qemu/qom/object.c:454
        #5  0x000055c4bcac6e6d in object_initialize (data=data@entry=0x55c4bdf239e0, size=size@entry=2464, typename=typename@entry=0x55c4bcc7c643 "xlnx.zynqmp_ipi") at /source/qemu/qom/object.c:474
        #6  0x000055c4bc9ea474 in xlnx_zynqmp_pmu_init (machine=0x55c4bdd46000) at /source/qemu/hw/microblaze/xlnx-zynqmp-pmu.c:176
        #7  0x000055c4bca3b6cb in machine_run_board_init (machine=0x55c4bdd46000) at /source/qemu/hw/core/machine.c:1030
        #8  0x000055c4bc95f6d2 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /source/qemu/vl.c:4479
      
      Since the caller knows the type name requested, we can simply display it
      to ease development.
      
      With this patch applied we get:
      
        $ qemu-system-microblaze -M xlnx-zynqmp-pmu
        qemu-system-microblaze: missing object type 'xlnx.zynqmp_ipi'
        Aborted (core dumped)
      
      Since the assert(type) check in object_initialize_with_type() is
      now impossible, remove it.
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20190427135642.16464-1-philmd@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      e02bdf1c
  15. May 20, 2019
Loading