[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] df3a2d: accel/tcg: Don't use CF_COUNT_MASK as
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] df3a2d: accel/tcg: Don't use CF_COUNT_MASK as the max valu... |
Date: |
Tue, 27 Jul 2021 02:55:46 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: df3a2de51a07089a4a729fe1f792f658df9dade4
https://github.com/qemu/qemu/commit/df3a2de51a07089a4a729fe1f792f658df9dade4
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M accel/tcg/cpu-exec.c
Log Message:
-----------
accel/tcg: Don't use CF_COUNT_MASK as the max value of icount_decr.u16.low
In cpu_loop_exec_tb() we were bounding the number of insns we might
try to execute in a TB using CF_COUNT_MASK. This is incorrect,
because we can validly put up to 0xffff into icount_decr.u16.low. In
particular, since commit 78ff82bb1b67c0d7 reduced CF_COUNT_MASK to
511 this meant that we would incorrectly only try to execute 511
instructions in a 512-instruction TB, which could result in QEMU
hanging when in icount mode.
Use the actual maximum value, which is 0xffff. (This brings this code
in to line with the similar logic in icount_prepare_for_run() in
tcg-accel-ops-icount.c.)
Fixes: 78ff82bb1b67c0d7
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/499
Message-Id: <20210725174405.24568-2-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: c8cf47a946200239826e58abc203dcaa4fdbb30c
https://github.com/qemu/qemu/commit/c8cf47a946200239826e58abc203dcaa4fdbb30c
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M accel/tcg/cpu-exec.c
Log Message:
-----------
accel/tcg: Remove unnecessary check on icount_extra in cpu_loop_exec_tb()
In cpu_loop_exec_tb(), we decide whether to look for a TB with
exactly insns_left instructions in it using the condition
(!cpu->icount_extra && insns_left > 0 && insns_left < tb->icount)
The check for icount_extra == 0 is unnecessary, because we just set
insns_left = MIN(0xffff, cpu->icount_budget);
icount_extra = icount_budget - insns_left;
and so icount_extra can only be non-zero if icount_budget > 0xffff
and insns_left == 0xffff. But in that case insns_left >= tb->icount
because 0xffff is much larger than TCG_MAX_INSNS, so the condition
will be false anyway.
Remove the unnecessary check, and instead assert:
* that we are only going to execute a partial TB here if the
icount budget has run out (ie icount_extra == 0)
* that the number of insns we're going to execute does fit into
the CF_COUNT_MASK
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210725174405.24568-3-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 2f0e10a4866c16e0b6f98fcc87add047200e4896
https://github.com/qemu/qemu/commit/2f0e10a4866c16e0b6f98fcc87add047200e4896
Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M hw/m68k/q800.c
M include/qemu/bitops.h
Log Message:
-----------
bitops.h: revert db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation")
Commit db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation") introduced
a bitrev8() function to reverse the bit ordering required for storing the
MAC address in the q800 PROM.
This function is not required since QEMU implements its own revbit8()
function which does exactly the same thing. Remove the extraneous
bitrev8() function and switch its only caller in hw/m68k/q800.c to
use revbit8() instead.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210725110557.3007-1-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: cd1675f8d7fa33b5071a4d3be5dcb69c38300f17
https://github.com/qemu/qemu/commit/cd1675f8d7fa33b5071a4d3be5dcb69c38300f17
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M nbd/server.c
Log Message:
-----------
nbd/server: Mark variable unused in nbd_negotiate_meta_queries
>From clang-13:
nbd/server.c:976:22: error: variable 'bitmaps' set but not used \
[-Werror,-Wunused-but-set-variable]
which is incorrect; see //bugs.llvm.org/show_bug.cgi?id=3888.
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 2521c775bdfc8150396c4cb173b54d51f44c207e
https://github.com/qemu/qemu/commit/2521c775bdfc8150396c4cb173b54d51f44c207e
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M accel/tcg/cpu-exec.c
Log Message:
-----------
accel/tcg: Remove unused variable in cpu_exec
>From clang-13:
accel/tcg/cpu-exec.c:783:15: error: variable 'cc' set but not used \
[-Werror,-Wunused-but-set-variable]
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 53645dc4cb7b74db3507558c01612c3e5ea430ab
https://github.com/qemu/qemu/commit/53645dc4cb7b74db3507558c01612c3e5ea430ab
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M util/selfmap.c
Log Message:
-----------
util/selfmap: Discard mapping on error
>From clang-13:
util/selfmap.c:26:21: error: variable 'errors' set but not used \
[-Werror,-Wunused-but-set-variable]
Quite right of course, but there's no reason not to check errors.
First, incrementing errors is incorrect, because qemu_strtoul
returns an errno not a count -- just or them together so that
we have a non-zero value at the end.
Second, if we have an error, do not add the struct to the list,
but free it instead.
Cc: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: fe4bd9170c92e5557f9c49ac08acc54c0d752aba
https://github.com/qemu/qemu/commit/fe4bd9170c92e5557f9c49ac08acc54c0d752aba
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M net/checksum.c
Log Message:
-----------
net/checksum: Remove unused variable in net_checksum_add_iov
>From clang-13:
../qemu/net/checksum.c:189:23: error: variable 'buf_off' set but not used \
[-Werror,-Wunused-but-set-variable]
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 79fe9e4313f9dbad8ee4619031900ccabd4f8824
https://github.com/qemu/qemu/commit/79fe9e4313f9dbad8ee4619031900ccabd4f8824
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M hw/audio/adlib.c
Log Message:
-----------
hw/audio/adlib: Remove unused variable in adlib_callback
>From clang-13:
hw/audio/adlib.c:189:18: error: variable 'net' set but not used \
[-Werror,-Wunused-but-set-variable]
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 2d758274ee477a96ba35ba05fe2e393c208e724b
https://github.com/qemu/qemu/commit/2d758274ee477a96ba35ba05fe2e393c208e724b
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M hw/ppc/spapr_events.c
Log Message:
-----------
hw/ppc/spapr_events: Remove unused variable from check_exception
>From clang-13:
hw/ppc/spapr_events.c:937:14: error: variable 'xinfo' set but not used \
[-Werror,-Wunused-but-set-variable]
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 984178d86b92be23b0efb6da769f22adb08cb83a
https://github.com/qemu/qemu/commit/984178d86b92be23b0efb6da769f22adb08cb83a
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M hw/pci-host/pnv_phb4.c
Log Message:
-----------
hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write
>From clang-13:
hw/pci-host/pnv_phb4.c:375:18: error: variable 'v' set but not used \
[-Werror,-Wunused-but-set-variable]
It's pretty clear that we meant to write back 'v' after
all that computation and not 'val'.
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 211364c21e7f757ae1acf4e72b5df39c498fb88b
https://github.com/qemu/qemu/commit/211364c21e7f757ae1acf4e72b5df39c498fb88b
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M linux-user/syscall.c
Log Message:
-----------
linux-user/syscall: Remove unused variable from execve
>From clang-13:
linux-user/syscall.c:8503:17: error: variable 'total_size' set but not used \
[-Werror,-Wunused-but-set-variable]
Acked-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: 2bf07e788eb69bee843be274386fb20f4ab6b0f6
https://github.com/qemu/qemu/commit/2bf07e788eb69bee843be274386fb20f4ab6b0f6
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2021-07-26 (Mon, 26 Jul 2021)
Changed paths:
M tests/unit/test-iov.c
Log Message:
-----------
tests/unit: Remove unused variable from test_io
>From clang-13:
tests/unit/test-iov.c:161:26: error: variable 't' set but not used \
[-Werror,-Wunused-but-set-variable]
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: c08ccd1b53f488ac86c1f65cf7623dc91acc249a
https://github.com/qemu/qemu/commit/c08ccd1b53f488ac86c1f65cf7623dc91acc249a
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-07-27 (Tue, 27 Jul 2021)
Changed paths:
M accel/tcg/cpu-exec.c
M hw/audio/adlib.c
M hw/m68k/q800.c
M hw/pci-host/pnv_phb4.c
M hw/ppc/spapr_events.c
M include/qemu/bitops.h
M linux-user/syscall.c
M nbd/server.c
M net/checksum.c
M tests/unit/test-iov.c
M util/selfmap.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210726' into
staging
Fix icount accounting.
Replace bitrev8 with revbit8.
Fixes for set but not used warnings.
# gpg: Signature made Mon 26 Jul 2021 22:45:37 BST
# gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg: issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
[full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* remotes/rth-gitlab/tags/pull-tcg-20210726:
tests/unit: Remove unused variable from test_io
linux-user/syscall: Remove unused variable from execve
hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write
hw/ppc/spapr_events: Remove unused variable from check_exception
hw/audio/adlib: Remove unused variable in adlib_callback
net/checksum: Remove unused variable in net_checksum_add_iov
util/selfmap: Discard mapping on error
accel/tcg: Remove unused variable in cpu_exec
nbd/server: Mark variable unused in nbd_negotiate_meta_queries
bitops.h: revert db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation")
accel/tcg: Remove unnecessary check on icount_extra in cpu_loop_exec_tb()
accel/tcg: Don't use CF_COUNT_MASK as the max value of icount_decr.u16.low
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/1f3c9c762e2a...c08ccd1b53f4