qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 60ff4e: hw/arm/highbank: Fix resource leak an


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 60ff4e: hw/arm/highbank: Fix resource leak and wrong image...
Date: Wed, 01 Apr 2015 11:30:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 60ff4e63e2ea4738f114cbaf1f17e6e0184fc09c
      
https://github.com/qemu/qemu/commit/60ff4e63e2ea4738f114cbaf1f17e6e0184fc09c
  Author: Stefan Weil <address@hidden>
  Date:   2015-04-01 (Wed, 01 Apr 2015)

  Changed paths:
    M hw/arm/highbank.c

  Log Message:
  -----------
  hw/arm/highbank: Fix resource leak and wrong image loading

Coverity reports a resource leak for sysboot_filename which is allocated
by qemu_find_file.

In addition, that name is used to get the size of the image, but a
different image name was used to load it.

In addition, instead of passing the maximum allowed image size the actual
image size was passed to load_image_targphys.

Fix all three issues.

Signed-off-by: Stefan Weil <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: db25a15817f98c46c5f0eea4f414249d8fbb96b1
      
https://github.com/qemu/qemu/commit/db25a15817f98c46c5f0eea4f414249d8fbb96b1
  Author: Stefan Weil <address@hidden>
  Date:   2015-04-01 (Wed, 01 Apr 2015)

  Changed paths:
    M hw/arm/vexpress.c

  Log Message:
  -----------
  hw/arm/vexpress: Fix memory leak reported by Coverity

As the conditional statement had to be split anyway, we can also
add a better error report message.

Signed-off-by: Stefan Weil <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 4de9a883be653f02f8c1d5dcd1066f614d9606b6
      
https://github.com/qemu/qemu/commit/4de9a883be653f02f8c1d5dcd1066f614d9606b6
  Author: Stefan Weil <address@hidden>
  Date:   2015-04-01 (Wed, 01 Apr 2015)

  Changed paths:
    M hw/arm/virt.c

  Log Message:
  -----------
  hw/arm/virt: Fix memory leak reported by Coverity

As the conditional statement had to be split anyway, we can also
add a better error report message.

Signed-off-by: Stefan Weil <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 7847f9ea9fce15a9ecfb62ab72c1e84ff516b0db
      
https://github.com/qemu/qemu/commit/7847f9ea9fce15a9ecfb62ab72c1e84ff516b0db
  Author: Peter Maydell <address@hidden>
  Date:   2015-04-01 (Wed, 01 Apr 2015)

  Changed paths:
    M target-arm/helper-a64.c
    M target-arm/helper.c
    M target-arm/internals.h

  Log Message:
  -----------
  target-arm: Store SPSR_EL1 state in banked_spsr[1] (SPSR_svc)

The AArch64 SPSR_EL1 register is architecturally mandated to
be mapped to the AArch32 SPSR_svc register. This means its
state should live in QEMU's env->banked_spsr[1] field.
Correct the various places in the code that incorrectly
put it in banked_spsr[0].

Signed-off-by: Peter Maydell <address@hidden>


  Commit: 1a1753f747544d20b999d466b1017721668bfb82
      
https://github.com/qemu/qemu/commit/1a1753f747544d20b999d466b1017721668bfb82
  Author: Alex Bennée <address@hidden>
  Date:   2015-04-01 (Wed, 01 Apr 2015)

  Changed paths:
    M target-arm/kvm.c
    M target-arm/kvm32.c
    M target-arm/kvm64.c
    M target-arm/kvm_arm.h

  Log Message:
  -----------
  target-arm: kvm: save/restore mp state

This adds the saving and restore of the current Multi-Processing state
of the machine. While the KVM_GET/SET_MP_STATE API exposes a number of
potential states for x86 we only use two for ARM. Either the process is
running or not. We then save this state into the cpu_powered TCG state
to avoid changing the serialisation format.

Signed-off-by: Alex Bennée <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 74fdb781c19ef4b781cb6fda48f1f9ebd11257fe
      
https://github.com/qemu/qemu/commit/74fdb781c19ef4b781cb6fda48f1f9ebd11257fe
  Author: Alex Bennée <address@hidden>
  Date:   2015-04-01 (Wed, 01 Apr 2015)

  Changed paths:
    M hw/intc/arm_gic_kvm.c

  Log Message:
  -----------
  hw/intc: arm_gic_kvm.c restore config first

As there is logic to deal with the difference between edge and level
triggered interrupts in the kernel we must ensure it knows the
configuration of the IRQs before we restore the pending state.

Signed-off-by: Alex Bennée <address@hidden>
Acked-by: Christoffer Dall <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 0e4b586932768107448f342ae4a314beedfa8f11
      
https://github.com/qemu/qemu/commit/0e4b586932768107448f342ae4a314beedfa8f11
  Author: Alex Bennée <address@hidden>
  Date:   2015-04-01 (Wed, 01 Apr 2015)

  Changed paths:
    M target-arm/kvm64.c

  Log Message:
  -----------
  target-arm: kvm64 sync FP register state

For migration to work we need to sync all of the register state. This is
especially noticeable when GCC starts using FP registers as spill
registers even with integer programs.

Signed-off-by: Alex Bennée <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 25b9fb107bc1f6735fdb3fce537792f5db95f78d
      
https://github.com/qemu/qemu/commit/25b9fb107bc1f6735fdb3fce537792f5db95f78d
  Author: Alex Bennée <address@hidden>
  Date:   2015-04-01 (Wed, 01 Apr 2015)

  Changed paths:
    M target-arm/kvm64.c

  Log Message:
  -----------
  target-arm: kvm64 fix save/restore of SPSR regs

The current code was negatively indexing the cpu state array and not
synchronizing banked spsr register state with the current mode's spsr
state, causing occasional failures with migration.

Some munging is done to take care of the aarch64 mapping and also to
ensure the most current value of the spsr is updated to the banked
registers (relevant for KVM<->TCG migration).

Signed-off-by: Alex Bennée <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 289494da25c5d6270e66a40267fd761ee8f54a90
      
https://github.com/qemu/qemu/commit/289494da25c5d6270e66a40267fd761ee8f54a90
  Author: Peter Maydell <address@hidden>
  Date:   2015-04-01 (Wed, 01 Apr 2015)

  Changed paths:
    M hw/arm/highbank.c
    M hw/arm/vexpress.c
    M hw/arm/virt.c
    M hw/intc/arm_gic_kvm.c
    M target-arm/helper-a64.c
    M target-arm/helper.c
    M target-arm/internals.h
    M target-arm/kvm.c
    M target-arm/kvm32.c
    M target-arm/kvm64.c
    M target-arm/kvm_arm.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20150401' 
into staging

target-arm:
 * Fix broken migration on AArch64 KVM
 * Fix minor memory leaks in virt, vexpress, highbank
 * Honour requested filename when loading highbank rom image

# gpg: Signature made Wed Apr  1 18:06:09 2015 BST using RSA key ID 14360CDE
# gpg: Good signature from "Peter Maydell <address@hidden>"

* remotes/pmaydell/tags/pull-target-arm-20150401:
  target-arm: kvm64 fix save/restore of SPSR regs
  target-arm: kvm64 sync FP register state
  hw/intc: arm_gic_kvm.c restore config first
  target-arm: kvm: save/restore mp state
  target-arm: Store SPSR_EL1 state in banked_spsr[1] (SPSR_svc)
  hw/arm/virt: Fix memory leak reported by Coverity
  hw/arm/vexpress: Fix memory leak reported by Coverity
  hw/arm/highbank: Fix resource leak and wrong image loading

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/fde069f751a9...289494da25c5

reply via email to

[Prev in Thread] Current Thread [Next in Thread]