Skip to content
Snippets Groups Projects
  1. Jan 08, 2021
    • Gan Qixin's avatar
      mss-timer: Use ptimer_free() in the finalize function to avoid memleaks · e4940041
      Gan Qixin authored
      
      When running device-introspect-test, a memory leak occurred in the
      mss_timer_init function, so use ptimer_free() in the finalize function to avoid
      it.
      
      ASAN shows memory leak stack:
      
      Indirect leak of 192 byte(s) in 2 object(s) allocated from:
          #0 0xffffab97e1f0 in __interceptor_calloc (/lib64/libasan.so.5+0xee1f0)
          #1 0xffffab256800 in g_malloc0 (/lib64/libglib-2.0.so.0+0x56800)
          #2 0xaaabf555db78 in ptimer_init /qemu/hw/core/ptimer.c:432
          #3 0xaaabf58a0010 in mss_timer_init /qemu/hw/timer/mss-timer.c:235
          #4 0xaaabf6339f6c in object_initialize_with_type /qemu/qom/object.c:515
          #5 0xaaabf633ca04 in object_initialize_child_with_propsv /qemu/qom/object.c:564
          #6 0xaaabf633cc08 in object_initialize_child_with_props /qemu/qom/object.c:547
          #7 0xaaabf5b8316c in m2sxxx_soc_initfn /qemu/hw/arm/msf2-soc.c:70
          #8 0xaaabf6339f6c in object_initialize_with_type /qemu/qom/object.c:515
          #9 0xaaabf633a1e0 in object_new_with_type /qemu/qom/object.c:729
          #10 0xaaabf6375e40 in qmp_device_list_properties /qemu/qom/qom-qmp-cmds.c:153
          #11 0xaaabf653d8ec in qmp_marshal_device_list_properties /qemu/qapi/qapi-commands-qdev.c:59
          #12 0xaaabf6587d08 in do_qmp_dispatch_bh /qemu/qapi/qmp-dispatch.c:110
      
      Reported-by: default avatarEuler Robot <euler.robot@huawei.com>
      Signed-off-by: default avatarGan Qixin <ganqixin@huawei.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      e4940041
    • Gan Qixin's avatar
      exynos4210_pwm: Use ptimer_free() in the finalize function to avoid memleaks · c9342c09
      Gan Qixin authored
      
      When running device-introspect-test, a memory leak occurred in the
      exynos4210_pwm_init function, so use ptimer_free() in the finalize function to
      avoid it.
      
      ASAN shows memory leak stack:
      
      Indirect leak of 240 byte(s) in 5 object(s) allocated from:
          #0 0xffffab97e1f0 in __interceptor_calloc (/lib64/libasan.so.5+0xee1f0)
          #1 0xffffab256800 in g_malloc0 (/lib64/libglib-2.0.so.0+0x56800)
          #2 0xaaabf555db84 in timer_new_full /qemu/include/qemu/timer.h:523
          #3 0xaaabf555db84 in timer_new /qemu/include/qemu/timer.h:544
          #4 0xaaabf555db84 in timer_new_ns /qemu/include/qemu/timer.h:562
          #5 0xaaabf555db84 in ptimer_init /qemu/hw/core/ptimer.c:433
          #6 0xaaabf56a36cc in exynos4210_pwm_init /qemu/hw/timer/exynos4210_pwm.c:401
          #7 0xaaabf6339f6c in object_initialize_with_type /qemu/qom/object.c:515
          #8 0xaaabf633a1e0 in object_new_with_type /qemu/qom/object.c:729
          #9 0xaaabf6375e40 in qmp_device_list_properties /qemu/qom/qom-qmp-cmds.c:153
          #10 0xaaabf653d8ec in qmp_marshal_device_list_properties /qemu/qapi/qapi-commands-qdev.c:59
          #11 0xaaabf6587d08 in do_qmp_dispatch_bh /qemu/qapi/qmp-dispatch.c:110
          #12 0xaaabf6552708 in aio_bh_call /qemu/util/async.c:136
      
      Reported-by: default avatarEuler Robot <euler.robot@huawei.com>
      Signed-off-by: default avatarGan Qixin <ganqixin@huawei.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      c9342c09
    • Gan Qixin's avatar
      exynos4210_rtc: Use ptimer_free() in the finalize function to avoid memleaks · 3fabd519
      Gan Qixin authored
      
      When running device-introspect-test, a memory leak occurred in the
      exynos4210_rtc_init function, so use ptimer_free() in the finalize function to
      avoid it.
      
      ASAN shows memory leak stack:
      
      Indirect leak of 96 byte(s) in 1 object(s) allocated from:
          #0 0xffffab97e1f0 in __interceptor_calloc (/lib64/libasan.so.5+0xee1f0)
          #1 0xffffab256800 in g_malloc0 (/lib64/libglib-2.0.so.0+0x56800)
          #2 0xaaabf555db78 in ptimer_init /qemu/hw/core/ptimer.c:432
          #3 0xaaabf57b3934 in exynos4210_rtc_init /qemu/hw/rtc/exynos4210_rtc.c:567
          #4 0xaaabf6339f6c in object_initialize_with_type /qemu/qom/object.c:515
          #5 0xaaabf633a1e0 in object_new_with_type /qemu/qom/object.c:729
          #6 0xaaabf6375e40 in qmp_device_list_properties /qemu/qom/qom-qmp-cmds.c:153
          #7 0xaaabf653d8ec in qmp_marshal_device_list_properties /qemu/qapi/qapi-commands-qdev.c:59
          #8 0xaaabf6587d08 in do_qmp_dispatch_bh /qemu/qapi/qmp-dispatch.c:110
          #9 0xaaabf6552708 in aio_bh_call /qemu/util/async.c:136
          #10 0xaaabf6552708 in aio_bh_poll /qemu/util/async.c:164
          #11 0xaaabf655f19c in aio_dispatch /qemu/util/aio-posix.c:381
          #12 0xaaabf65523f4 in aio_ctx_dispatch /qemu/util/async.c:306
      
      Reported-by: default avatarEuler Robot <euler.robot@huawei.com>
      Signed-off-by: default avatarGan Qixin <ganqixin@huawei.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      3fabd519
    • Gan Qixin's avatar
      allwinner-a10-pit: Use ptimer_free() in the finalize function to avoid memleaks · e1c5909b
      Gan Qixin authored
      
      When running device-introspect-test, a memory leak occurred in the a10_pit_init
      function, so use ptimer_free() in the finalize function to avoid it.
      
      ASAN shows memory leak stack:
      
      Indirect leak of 288 byte(s) in 6 object(s) allocated from:
          #0 0xffffab97e1f0 in __interceptor_calloc (/lib64/libasan.so.5+0xee1f0)
          #1 0xffffab256800 in g_malloc0 (/lib64/libglib-2.0.so.0+0x56800)
          #2 0xaaabf555db84 in timer_new_full /qemu/include/qemu/timer.h:523
          #3 0xaaabf555db84 in timer_new /qemu/include/qemu/timer.h:544
          #4 0xaaabf555db84 in timer_new_ns /qemu/include/qemu/timer.h:562
          #5 0xaaabf555db84 in ptimer_init /qemu/hw/core/ptimer.c:433
          #6 0xaaabf57415e8 in a10_pit_init /qemu/hw/timer/allwinner-a10-pit.c:278
          #7 0xaaabf6339f6c in object_initialize_with_type /qemu/qom/object.c:515
          #8 0xaaabf633ca04 in object_initialize_child_with_propsv /qemu/qom/object.c:564
          #9 0xaaabf633cc08 in object_initialize_child_with_props /qemu/qom/object.c:547
          #10 0xaaabf5b94680 in aw_a10_init /qemu/hw/arm/allwinner-a10.c:49
          #11 0xaaabf6339f6c in object_initialize_with_type /qemu/qom/object.c:515
          #12 0xaaabf633a1e0 in object_new_with_type /qemu/qom/object.c:729
      
      Reported-by: default avatarEuler Robot <euler.robot@huawei.com>
      Signed-off-by: default avatarGan Qixin <ganqixin@huawei.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      e1c5909b
    • Gan Qixin's avatar
      digic-timer: Use ptimer_free() in the finalize function to avoid memleaks · ea492b12
      Gan Qixin authored
      
      When running device-introspect-test, a memory leak occurred in the
      digic_timer_init function, so use ptimer_free() in the finalize function to
      avoid it.
      
      ASAN shows memory leak stack:
      
      Indirect leak of 288 byte(s) in 3 object(s) allocated from:
          #0 0xffffab97e1f0 in __interceptor_calloc (/lib64/libasan.so.5+0xee1f0)
          #1 0xffffab256800 in g_malloc0 (/lib64/libglib-2.0.so.0+0x56800)
          #2 0xaaabf555db78 in ptimer_init /qemu/hw/core/ptimer.c:432
          #3 0xaaabf5b04084 in digic_timer_init /qemu/hw/timer/digic-timer.c:142
          #4 0xaaabf6339f6c in object_initialize_with_type /qemu/qom/object.c:515
          #5 0xaaabf633ca04 in object_initialize_child_with_propsv /qemu/qom/object.c:564
          #6 0xaaabf633cc08 in object_initialize_child_with_props /qemu/qom/object.c:547
          #7 0xaaabf5b40e84 in digic_init /qemu/hw/arm/digic.c:46
          #8 0xaaabf6339f6c in object_initialize_with_type /qemu/qom/object.c:515
          #9 0xaaabf633a1e0 in object_new_with_type /qemu/qom/object.c:729
          #10 0xaaabf6375e40 in qmp_device_list_properties /qemu/qom/qom-qmp-cmds.c:153
          #11 0xaaabf653d8ec in qmp_marshal_device_list_properties /qemu/qapi/qapi-commands-qdev.c:59
          #12 0xaaabf6587d08 in do_qmp_dispatch_bh /qemu/qapi/qmp-dispatch.c:110
      
      Reported-by: default avatarEuler Robot <euler.robot@huawei.com>
      Signed-off-by: default avatarGan Qixin <ganqixin@huawei.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      ea492b12
    • Peter Maydell's avatar
      Remove superfluous timer_del() calls · 729cc683
      Peter Maydell authored
      
      This commit is the result of running the timer-del-timer-free.cocci
      script on the whole source tree.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Acked-by: default avatarCorey Minyard <cminyard@mvista.com>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20201215154107.3255-4-peter.maydell@linaro.org
      729cc683
    • Peter Maydell's avatar
      hw/arm/highbank: Drop dead KVM support code · 416dd952
      Peter Maydell authored
      
      Support for running KVM on 32-bit Arm hosts was removed in commit
      82bf7ae8.  You can still run a 32-bit guest on a 64-bit Arm
      host CPU, but because Arm KVM requires the host and guest CPU types
      to match, it is not possible to run a guest that requires a Cortex-A9
      or Cortex-A15 CPU there.  That means that the code in the
      highbank/midway board models to support KVM is no longer used, and we
      can delete it.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20201215144215.28482-1-peter.maydell@linaro.org
      416dd952
    • Peter Maydell's avatar
      hw/intc/armv7m_nvic: Correct handling of CCR.BFHFNMIGN · 5b7d6370
      Peter Maydell authored
      
      The CCR is a register most of whose bits are banked between security
      states but where BFHFNMIGN is not, and we keep it in the non-secure
      entry of the v7m.ccr[] array.  The logic which tries to handle this
      bit fails to implement the "RAZ/WI from Nonsecure if AIRCR.BFHFNMINS
      is zero" requirement; correct the omission.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20201210201433.26262-2-peter.maydell@linaro.org
      5b7d6370
    • Andrew Jones's avatar
      hw/arm/virt: Remove virt machine state 'smp_cpus' · 9cd07db9
      Andrew Jones authored
      
      virt machine's 'smp_cpus' and machine->smp.cpus must always have the
      same value. And, anywhere we have virt machine state we have machine
      state. So let's remove the redundancy. Also, to make it easier to see
      that machine->smp is the true source for "smp_cpus" and "max_cpus",
      avoid passing them in function parameters, preferring instead to get
      them from the state.
      
      No functional change intended.
      
      Signed-off-by: default avatarAndrew Jones <drjones@redhat.com>
      Reviewed-by: default avatarDavid Edmondson <david.edmondson@oracle.com>
      Reviewed-by: default avatarYing Fang <fangying1@huawei.com>
      Message-id: 20201215174815.51520-1-drjones@redhat.com
      [PMM: minor formatting tweak to smp_cpus variable declaration]
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      9cd07db9
    • Edgar E. Iglesias's avatar
      intc/arm_gic: Fix gic_irq_signaling_enabled() for vCPUs · 4663b72a
      Edgar E. Iglesias authored
      
      Correct the indexing into s->cpu_ctlr for vCPUs.
      
      Signed-off-by: default avatarEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarLuc Michel <luc.michel@greensocs.com>
      Message-id: 20201214222154.3480243-2-edgar.iglesias@gmail.com
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      4663b72a
  2. Jan 06, 2021
  3. Jan 04, 2021
Loading