All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] s390x/kvm: help valgrind in several places
@ 2020-04-29  7:42 Christian Borntraeger
  2020-04-29  7:44 ` David Hildenbrand
  2020-05-04 10:32 ` Cornelia Huck
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Borntraeger @ 2020-04-29  7:42 UTC (permalink / raw)
  To: qemu-devel, Cornelia Huck
  Cc: Thomas Huth, Janosch Frank, David Hildenbrand, Halil Pasic,
	Christian Borntraeger, qemu-s390x, Philippe Mathieu-Daudé,
	Richard Henderson

We need some little help in the code to reduce the valgrind noise.
This patch does this with some designated initializers for the cpu
model features and subfunctions.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 target/s390x/kvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 69881a0da0..f2f75d2a57 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -2165,7 +2165,7 @@ int kvm_arch_msi_data_to_gsi(uint32_t data)
 
 static int query_cpu_subfunc(S390FeatBitmap features)
 {
-    struct kvm_s390_vm_cpu_subfunc prop;
+    struct kvm_s390_vm_cpu_subfunc prop = {};
     struct kvm_device_attr attr = {
         .group = KVM_S390_VM_CPU_MODEL,
         .attr = KVM_S390_VM_CPU_MACHINE_SUBFUNC,
@@ -2292,7 +2292,7 @@ static int kvm_to_feat[][2] = {
 
 static int query_cpu_feat(S390FeatBitmap features)
 {
-    struct kvm_s390_vm_cpu_feat prop;
+    struct kvm_s390_vm_cpu_feat prop = {};
     struct kvm_device_attr attr = {
         .group = KVM_S390_VM_CPU_MODEL,
         .attr = KVM_S390_VM_CPU_MACHINE_FEAT,
-- 
2.25.1



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

* Re: [PATCH v2] s390x/kvm: help valgrind in several places
  2020-04-29  7:42 [PATCH v2] s390x/kvm: help valgrind in several places Christian Borntraeger
@ 2020-04-29  7:44 ` David Hildenbrand
  2020-05-04 10:32 ` Cornelia Huck
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2020-04-29  7:44 UTC (permalink / raw)
  To: Christian Borntraeger, qemu-devel, Cornelia Huck
  Cc: Thomas Huth, Janosch Frank, Halil Pasic, qemu-s390x,
	Philippe Mathieu-Daudé,
	Richard Henderson

On 29.04.20 09:42, Christian Borntraeger wrote:
> We need some little help in the code to reduce the valgrind noise.
> This patch does this with some designated initializers for the cpu
> model features and subfunctions.
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  target/s390x/kvm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> index 69881a0da0..f2f75d2a57 100644
> --- a/target/s390x/kvm.c
> +++ b/target/s390x/kvm.c
> @@ -2165,7 +2165,7 @@ int kvm_arch_msi_data_to_gsi(uint32_t data)
>  
>  static int query_cpu_subfunc(S390FeatBitmap features)
>  {
> -    struct kvm_s390_vm_cpu_subfunc prop;
> +    struct kvm_s390_vm_cpu_subfunc prop = {};
>      struct kvm_device_attr attr = {
>          .group = KVM_S390_VM_CPU_MODEL,
>          .attr = KVM_S390_VM_CPU_MACHINE_SUBFUNC,
> @@ -2292,7 +2292,7 @@ static int kvm_to_feat[][2] = {
>  
>  static int query_cpu_feat(S390FeatBitmap features)
>  {
> -    struct kvm_s390_vm_cpu_feat prop;
> +    struct kvm_s390_vm_cpu_feat prop = {};
>      struct kvm_device_attr attr = {
>          .group = KVM_S390_VM_CPU_MODEL,
>          .attr = KVM_S390_VM_CPU_MACHINE_FEAT,
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



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

* Re: [PATCH v2] s390x/kvm: help valgrind in several places
  2020-04-29  7:42 [PATCH v2] s390x/kvm: help valgrind in several places Christian Borntraeger
  2020-04-29  7:44 ` David Hildenbrand
@ 2020-05-04 10:32 ` Cornelia Huck
  1 sibling, 0 replies; 3+ messages in thread
From: Cornelia Huck @ 2020-05-04 10:32 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Thomas Huth, Janosch Frank, David Hildenbrand, qemu-devel,
	Halil Pasic, qemu-s390x, Philippe Mathieu-Daudé,
	Richard Henderson

On Wed, 29 Apr 2020 03:42:01 -0400
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> We need some little help in the code to reduce the valgrind noise.
> This patch does this with some designated initializers for the cpu
> model features and subfunctions.
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  target/s390x/kvm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, applied.



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

end of thread, other threads:[~2020-05-04 10:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  7:42 [PATCH v2] s390x/kvm: help valgrind in several places Christian Borntraeger
2020-04-29  7:44 ` David Hildenbrand
2020-05-04 10:32 ` Cornelia Huck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.