diff options
author | Markus Armbruster | 2020-04-22 15:07:09 +0200 |
---|---|---|
committer | Markus Armbruster | 2020-04-29 08:01:52 +0200 |
commit | 9ec374a781c34daa6e70fcd885ef30e090cc2384 (patch) | |
tree | ab9586712a191596b64f3dbdc07816cd7e1b3f4b /balloon.c | |
parent | cpus: Fix configure_icount() error API violation (diff) | |
download | qemu-9ec374a781c34daa6e70fcd885ef30e090cc2384.tar.gz qemu-9ec374a781c34daa6e70fcd885ef30e090cc2384.tar.xz qemu-9ec374a781c34daa6e70fcd885ef30e090cc2384.zip |
cpus: Proper range-checking for -icount shift=N
timers_state.icount_time_shift must be in [0,63] to avoid undefined
behavior when shifting by it, e.g. in cpu_icount_to_ns().
icount_adjust() clamps it to [0,MAX_ICOUNT_SHIFT], with
MAX_ICOUNT_SHIFT = 10. configure_icount() doesn't. Fix that.
Fixes: a8bfac37085c3372366d722f131a7e18d664ee4d
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200422130719.28225-5-armbru@redhat.com>
Diffstat (limited to 'balloon.c')
0 files changed, 0 insertions, 0 deletions