target-arm queue
Couple of stray patches for rc0...
-- PMM
The following changes since commit 5d3217340adcb6c4f0e4af5d2b865331eb2ff63d:
disas: Fix ATTRIBUTE_UNUSED define clash with ALSA headers (2016-07-19 16:40:39 +0100)
are available in the git repository at:
git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20160719
for you to fetch changes up to acd82796211041c5af43c8c523b85d250c2ccebe:
arm_gicv3: Add assert()s to tell Coverity that offsets are aligned (2016-07-19 17:56:27 +0100)
----------------------------------------------------------------
target-arm queue:
* fix two minor Coverity complaints
----------------------------------------------------------------
Peter Maydell (2):
target-arm: Fix unreachable code in gicv3_class_name()
arm_gicv3: Add assert()s to tell Coverity that offsets are aligned
hw/intc/arm_gicv3_redist.c | 4 ++++ target-arm/machine.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-)
[Qemu-devel] [PULL 1/2] target-arm: Fix unreachable code in gicv3_class_name()
Coverity complains that the exit() in gicv3_class_name() can be unreachable, because if TARGET_AARCH64 is defined then all code paths return before reaching it. Move the exit() up to the error_report() that it belongs with.
Message-id: [email protected]
--- target-arm/machine.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
target-arm/machine.c +1 -2
@@ -340,10 +340,9 @@ const char *gicv3_class_name(void)#else error_report ("KVM GICv3 acceleration is not supported on this " "platform" ); +exit (1 );#endif }else {return "arm-gicv3" ; } - -exit (1 ); }
Signature · 1 line
1.9.1
[Qemu-devel] [PULL 2/2] arm_gicv3: Add assert()s to tell Coverity that offsets are aligned
In reply to Peter MaydellCoverity complains that the GICR_IPRIORITYR case in gicv3_readl() can overflow an array, because it doesn't know that the offsets passed to that function must be word aligned. Add some assert()s which hopefully tell Coverity that this isn't possible.
Message-id: [email protected]
--- hw/intc/arm_gicv3_redist.c | 4 ++++ 1 file changed, 4 insertions(+)
hw/intc/arm_gicv3_redist.c +4 -0
@@ -420,6 +420,8 @@ MemTxResult gicv3_redist_read(void *opaque, hwaddr offset, uint64_t *data,MemTxResult r;int cpuidx; +assert ((offset & (size -1 )) ==0 ); +/* This region covers all the redistributor pages; there are * (for GICv3) two 64K pages per CPU. At the moment they are * all contiguous (ie in this one region), though we might later
@@ -468,6 +470,8 @@ MemTxResult gicv3_redist_write(void *opaque, hwaddr offset, uint64_t data,MemTxResult r;int cpuidx; +assert ((offset & (size -1 )) ==0 ); +/* This region covers all the redistributor pages; there are * (for GICv3) two 64K pages per CPU. At the moment they are * all contiguous (ie in this one region), though we might later
Signature · 1 line
1.9.1
Peter Maydell
AppliedQuoted 12 lines · Peter Maydell
Couple of stray patches for rc0...
-- PMM
The following changes since commit
5d3217340adcb6c4f0e4af5d2b865331eb2ff63d:disas: Fix
ATTRIBUTE_UNUSEDdefine clash with ALSA headers (2016-07-19 16:40:39 +0100)are available in the git repository at:
git://git.linaro.org/people/pmaydell/qemu-arm.gittags/pull-target-arm-20160719
Quoted 7 lines
for you to fetch changes up to
acd82796211041c5af43c8c523b85d250c2ccebe:
arm_gicv3: Add assert()s to tell Coverity that offsets are aligned (2016-07-19 17:56:27 +0100)----------------------------------------------------------------
target-arm queue:
* fix two minor Coverity complaints
Applied, thanks.
-- PMM