[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/4] ppc: valgrind "uninitialized values" fixes
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH 0/4] ppc: valgrind "uninitialized values" fixes |
Date: |
Wed, 30 Mar 2022 18:04:39 -0300 |
Hi,
These are a handful of trivial fixes to make Valgrind happier when
profiling the boot of a pSeries guest. All the patches are handling a
similar case where we have something similar to this:
---
uint64_t val;
(...)
kvm_vcpu_ioctl(...., &val);
---
Valgrind does not consider that 'val' was initialized and then it keeps
complaining about every future use of 'val', or anything that got
assigned as 'val', as being an uninitialized value/data. The fix is
simple and without any side effects:: just initialize 'val'.
After this series, together with the memory leak fix sent in [1], we
don't see any more ppc/spapr related Valgrind memcheck complaints when
booting a pSeries guest.
No functional changes were made.
[1] https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg06804.html
Daniel Henrique Barboza (4):
target/ppc: initialize 'reg_val' in kvm_get_one_spr()
target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()
target/ppc: init 'sregs' in kvmppc_put_books_sregs()
target/ppc: init 'rmmu_info' in kvm_get_radix_page_info()
target/ppc/kvm.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
--
2.35.1
- [PATCH 0/4] ppc: valgrind "uninitialized values" fixes,
Daniel Henrique Barboza <=
[PATCH 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr(), Daniel Henrique Barboza, 2022/03/30
[PATCH 3/4] target/ppc: init 'sregs' in kvmppc_put_books_sregs(), Daniel Henrique Barboza, 2022/03/30
[PATCH 4/4] target/ppc: init 'rmmu_info' in kvm_get_radix_page_info(), Daniel Henrique Barboza, 2022/03/30
Re: [PATCH 0/4] ppc: valgrind "uninitialized values" fixes, Philippe Mathieu-Daudé, 2022/03/30