[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/9] valgrind/i386: avoid false positives on KVM_SET
From: |
Christian Borntraeger |
Subject: |
[Qemu-devel] [PATCH 2/9] valgrind/i386: avoid false positives on KVM_SET_CLOCK ioctl |
Date: |
Thu, 30 Oct 2014 10:36:42 +0100 |
kvm_clock_data contains pad fields. Let's use a designated
initializer to avoid false positives from valgrind/memcheck.
Signed-off-by: Christian Borntraeger <address@hidden>
---
hw/i386/kvm/clock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 1ac60d6..78f5d26 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -88,7 +88,7 @@ static void kvmclock_vm_state_change(void *opaque, int
running,
int ret;
if (running) {
- struct kvm_clock_data data;
+ struct kvm_clock_data data = {};
uint64_t time_at_migration = kvmclock_current_nsec(s);
s->clock_valid = false;
@@ -99,7 +99,6 @@ static void kvmclock_vm_state_change(void *opaque, int
running,
}
data.clock = s->clock;
- data.flags = 0;
ret = kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &data);
if (ret < 0) {
fprintf(stderr, "KVM_SET_CLOCK failed: %s\n", strerror(ret));
--
1.9.3
- [Qemu-devel] [PATCH 0/9] valgrind/i386/s390x: memcheck false positives, Christian Borntraeger, 2014/10/30
- [Qemu-devel] [PATCH 2/9] valgrind/i386: avoid false positives on KVM_SET_CLOCK ioctl,
Christian Borntraeger <=
- [Qemu-devel] [PATCH 6/9] valgrind/i386: avoid false positives on KVM_SET_MSRS(TSC) ioctl, Christian Borntraeger, 2014/10/30
- [Qemu-devel] [PATCH 8/9] valgrind/i386: avoid false positives on KVM_SET_VCPU_EVENTS ioctl, Christian Borntraeger, 2014/10/30
- [Qemu-devel] [PATCH 1/9] valgrind: avoid false positives in KVM_GET_DIRTY_LOG ioctl, Christian Borntraeger, 2014/10/30
- [Qemu-devel] [PATCH 7/9] valgrind/i386: avoid false positives on KVM_GET_MSRS ioctl, Christian Borntraeger, 2014/10/30
- [Qemu-devel] [PATCH 9/9] valgrind/s390x: avoid false positives on KVM_SET_FPU ioctl, Christian Borntraeger, 2014/10/30
- [Qemu-devel] [PATCH 3/9] valgrind/i386: avoid false positives on KVM_SET_PIT ioctl, Christian Borntraeger, 2014/10/30
- [Qemu-devel] [PATCH 5/9] valgrind/i386: avoid false positives on KVM_SET_MSRS ioctl, Christian Borntraeger, 2014/10/30
- [Qemu-devel] [PATCH 4/9] valgrind/i386: avoid false positives on KVM_SET_XCRS ioctl, Christian Borntraeger, 2014/10/30
- Re: [Qemu-devel] [PATCH 0/9] valgrind/i386/s390x: memcheck false positives, Peter Maydell, 2014/10/30