qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 7/9] valgrind/i386: avoid false positives on KVM_GET_MSRS ioctl
Date: Wed, 05 Nov 2014 11:37:25 +0100	[thread overview]
Message-ID: <5459FDE5.4010300@redhat.com> (raw)
In-Reply-To: <5459FCE1.9060903@redhat.com>



On 05/11/2014 11:33, Paolo Bonzini wrote:
> On 30/10/2014 10:36, Christian Borntraeger wrote:
>> struct kvm_msrs contains a pad field. Lets initialize this pad
>> field. A designated initializer seems not appropriate here, as
>> struct kvm_msrs is embedded in the msr_data structure.
>>
>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> 
> What about this:
> 
>     msr_data.info = (struct kvm_msrs) {
>         .nmsrs = n
>     };
> 
> ?  It would also be applicable to other uses of kvm_msrs.

Also, KVM_SET_MSRS has to deal with a reserved field in struct
kvm_msr_entry.  Currently you handle it with a relatively large memset
produced by the designated initializer "= {}" in kvm_put_msrs.  However,
you could set it in kvm_msr_entry_set, and avoid the memset.

Paolo

> Also, you're missing one occurrence in kvm_put_msr_feature_control.

  reply	other threads:[~2014-11-05 10:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30  9:36 [Qemu-devel] [PATCH 0/9] valgrind/i386/s390x: memcheck false positives Christian Borntraeger
2014-10-30  9:36 ` [Qemu-devel] [PATCH 1/9] valgrind: avoid false positives in KVM_GET_DIRTY_LOG ioctl Christian Borntraeger
2014-10-30  9:36 ` [Qemu-devel] [PATCH 2/9] valgrind/i386: avoid false positives on KVM_SET_CLOCK ioctl Christian Borntraeger
2014-10-30  9:36 ` [Qemu-devel] [PATCH 3/9] valgrind/i386: avoid false positives on KVM_SET_PIT ioctl Christian Borntraeger
2014-10-30  9:36 ` [Qemu-devel] [PATCH 4/9] valgrind/i386: avoid false positives on KVM_SET_XCRS ioctl Christian Borntraeger
2014-10-30  9:36 ` [Qemu-devel] [PATCH 5/9] valgrind/i386: avoid false positives on KVM_SET_MSRS ioctl Christian Borntraeger
2014-10-30  9:36 ` [Qemu-devel] [PATCH 6/9] valgrind/i386: avoid false positives on KVM_SET_MSRS(TSC) ioctl Christian Borntraeger
2014-10-30  9:36 ` [Qemu-devel] [PATCH 7/9] valgrind/i386: avoid false positives on KVM_GET_MSRS ioctl Christian Borntraeger
2014-11-05 10:33   ` Paolo Bonzini
2014-11-05 10:37     ` Paolo Bonzini [this message]
2014-10-30  9:36 ` [Qemu-devel] [PATCH 8/9] valgrind/i386: avoid false positives on KVM_SET_VCPU_EVENTS ioctl Christian Borntraeger
2014-10-30  9:36 ` [Qemu-devel] [PATCH 9/9] valgrind/s390x: avoid false positives on KVM_SET_FPU ioctl Christian Borntraeger
2014-10-30  9:46 ` [Qemu-devel] [PATCH 0/9] valgrind/i386/s390x: memcheck false positives Peter Maydell
2014-10-30  9:50   ` Christian Borntraeger
2014-10-30  9:58     ` Peter Maydell
2014-10-30 11:01       ` Christian Borntraeger
2014-10-30 13:03 ` Paolo Bonzini
2014-10-30 13:20   ` Christian Borntraeger
2014-11-03 12:27     ` Paolo Bonzini
2014-11-13 14:34 ` Paolo Bonzini
2014-11-13 19:07   ` Christian Borntraeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5459FDE5.4010300@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).