qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ppc: valgrind "uninitialized values" fixes
@ 2022-03-30 21:04 Daniel Henrique Barboza
  2022-03-30 21:04 ` [PATCH 1/4] target/ppc: initialize 'reg_val' in kvm_get_one_spr() Daniel Henrique Barboza
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-30 21:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel Henrique Barboza, qemu-ppc, clg, david

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-03-30 21:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-30 21:04 [PATCH 0/4] ppc: valgrind "uninitialized values" fixes Daniel Henrique Barboza
2022-03-30 21:04 ` [PATCH 1/4] target/ppc: initialize 'reg_val' in kvm_get_one_spr() Daniel Henrique Barboza
2022-03-30 21:22   ` Philippe Mathieu-Daudé
2022-03-30 21:34     ` Daniel Henrique Barboza
2022-03-30 21:38       ` Philippe Mathieu-Daudé
2022-03-30 21:39         ` Philippe Mathieu-Daudé
2022-03-30 21:04 ` [PATCH 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr() Daniel Henrique Barboza
2022-03-30 21:04 ` [PATCH 3/4] target/ppc: init 'sregs' in kvmppc_put_books_sregs() Daniel Henrique Barboza
2022-03-30 21:04 ` [PATCH 4/4] target/ppc: init 'rmmu_info' in kvm_get_radix_page_info() Daniel Henrique Barboza
2022-03-30 21:46 ` [PATCH 0/4] ppc: valgrind "uninitialized values" fixes Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).