Re: [PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-04-05 Thread Daniel Henrique Barboza
On 4/1/22 00:40, David Gibson wrote: On Thu, Mar 31, 2022 at 03:46:57PM -0300, Daniel Henrique Barboza wrote: On 3/31/22 14:36, Richard Henderson wrote: On 3/31/22 11:17, Daniel Henrique Barboza wrote: Hmm... this is seeming a bit like whack-a-mole.  Could we instead use one of the valgri

Re: [PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-03-31 Thread David Gibson
On Thu, Mar 31, 2022 at 03:46:57PM -0300, Daniel Henrique Barboza wrote: > > > On 3/31/22 14:36, Richard Henderson wrote: > > On 3/31/22 11:17, Daniel Henrique Barboza wrote: > > > > Hmm... this is seeming a bit like whack-a-mole.  Could we instead use > > > > one of the valgrind hinting mechanis

Re: [PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-03-31 Thread David Gibson
On Thu, Mar 31, 2022 at 02:17:42PM -0300, Daniel Henrique Barboza wrote: > > > On 3/30/22 22:25, David Gibson wrote: > > On Wed, Mar 30, 2022 at 09:17:15PM -0300, Daniel Henrique Barboza wrote: > > > 'lpcr' is used as an input of kvm_get_one_reg(). Valgrind doesn't > > > understand that and it re

Re: [PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-03-31 Thread Daniel Henrique Barboza
On 3/31/22 14:36, Richard Henderson wrote: On 3/31/22 11:17, Daniel Henrique Barboza wrote: Hmm... this is seeming a bit like whack-a-mole.  Could we instead use one of the valgrind hinting mechanisms to inform it that kvm_get_one_reg() writes the variable at *target? I didn't find a way of

Re: [PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-03-31 Thread Richard Henderson
On 3/31/22 11:17, Daniel Henrique Barboza wrote: Hmm... this is seeming a bit like whack-a-mole.  Could we instead use one of the valgrind hinting mechanisms to inform it that kvm_get_one_reg() writes the variable at *target? I didn't find a way of doing that looking in the memcheck helpers (ht

Re: [PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-03-31 Thread Daniel Henrique Barboza
On 3/30/22 22:25, David Gibson wrote: On Wed, Mar 30, 2022 at 09:17:15PM -0300, Daniel Henrique Barboza wrote: 'lpcr' is used as an input of kvm_get_one_reg(). Valgrind doesn't understand that and it returns warnings as such for this function: ==55240== Thread 1: ==55240== Conditional jump o

Re: [PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-03-30 Thread David Gibson
On Wed, Mar 30, 2022 at 09:17:15PM -0300, Daniel Henrique Barboza wrote: > 'lpcr' is used as an input of kvm_get_one_reg(). Valgrind doesn't > understand that and it returns warnings as such for this function: > > ==55240== Thread 1: > ==55240== Conditional jump or move depends on uninitialised va

[PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-03-30 Thread Daniel Henrique Barboza
'lpcr' is used as an input of kvm_get_one_reg(). Valgrind doesn't understand that and it returns warnings as such for this function: ==55240== Thread 1: ==55240== Conditional jump or move depends on uninitialised value(s) ==55240==at 0xB011E4: kvmppc_enable_cap_large_decr (kvm.c:2546) ==55240=