From nobody Wed Nov 12 11:49:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1570209318; cv=none; d=zoho.com; s=zohoarc; b=CF6BwBwfFBo4CbX0/XwOhowFeZahMGWS2eWAaI2q+LzmUuEIml4oMJPra888olui9GO59qfuSw3XWBe9YhCsK9h4sN8fLlXZNd25IDfHGjtlpaX1X1TWUmJmOynnkmsS/KiCYvW1dVMfHwvSVC3wjucy8pKoZfpKM9jZ6/WXFts= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570209318; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ZDqqXdcMXiQ0rY6+l1b7+0ccr/E+z+91d4l9ckAYnz8=; b=ZukRtrHEIouxklucxOoZIxvCsSWb1i62rFn93xSLDxEs5yEHdj5DWrzagsZHNhgbYuwtqJXyqZ1JR61k/KANxFVA7mPfa86lOz9OHewAAY11ljOIp6ACQF99HpF1Vc7Pnyh3jlojtCpE0BeZupyrz5aymC5VZQs92OE/UOtZJJQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1570209318569974.4722412053535; Fri, 4 Oct 2019 10:15:18 -0700 (PDT) Received: from localhost ([::1]:50712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGRAh-0001B7-0D for importer@patchew.org; Fri, 04 Oct 2019 13:15:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51161) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGQvf-0007TN-GF for qemu-devel@nongnu.org; Fri, 04 Oct 2019 12:59:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGQve-0001zK-3G for qemu-devel@nongnu.org; Fri, 04 Oct 2019 12:59:43 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:44618) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGQvc-0001xR-1P for qemu-devel@nongnu.org; Fri, 04 Oct 2019 12:59:41 -0400 Received: by mail-wr1-x442.google.com with SMTP id z9so8031059wrl.11 for ; Fri, 04 Oct 2019 09:59:38 -0700 (PDT) Received: from 640k.localdomain ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id u7sm7041270wrp.19.2019.10.04.09.59.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Oct 2019 09:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZDqqXdcMXiQ0rY6+l1b7+0ccr/E+z+91d4l9ckAYnz8=; b=Y1+pwSut5tKZjysY8cv0rIp5iVCM5GO6zqh+tET7Fm66KN6AGBlIBHb/3jLKHtqU0r XA9BVsfhgBZHxUR+T1SZOIYUV27H6UpLOJnmgKczvXxLrurMvnsrivfiTaq0Lw4SKwzk 5itzbUHbuvy3/R874v874qAa7FVJeyUF7axBfM3UYj/y+RM3MGHsimoPVV/D5ko37BL5 q4xptReR/L2WapjUvUl25NQU6R3UMlSbJXXwXctRbnEmdgVcp3OIUnCCLJ7k16bJ+Q7e wL3Ua/A1jzewMZjXYGemmQAbDtb/tupzpAUPS+yV30MN0I8dFfS5xNQL6J/5T1epU6dx L0Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=ZDqqXdcMXiQ0rY6+l1b7+0ccr/E+z+91d4l9ckAYnz8=; b=qc+1VEqWuZo0kqvDQmqmQ74ScHFEnoA75VJqKKNtxRbhp46UcXRPznib8NstTRYxfU CyGfgpD51MOQ65ZG9Y+tVJRWY6GH+SQtDYtIIENOkbeJ7nGlg+VZfbBTxUEI1WxdzwUh 8PjuFZ1NROZ9lFt8616ZnTQvtuC9zubo8qYOtNqlStOdZV7utUHXGggqwF4YlJ7gwrfd hQYQ5g/4mI++8c2RFsFoATKYv3mHFv+LvTd4n/u56X+lxyOCkTvJX7EWiuSKnXiBr+Rk WKyUZzxBjtbrnZbePI2+PJNA6HAEnfhHseDpnV/Sz56XXng1pS0wfbUqa/W275zX7JEv oN+Q== X-Gm-Message-State: APjAAAUAze/qy+tjeD21XQLIFnzebRUmwchWVUFdmtMGaG0CuBnz9q6O zTmOZf5XchfoVV4FzHz6f49YIjR3 X-Google-Smtp-Source: APXvYqynAv0MyljEWOZ876CmCylDCMs7fD8k+JURG+33CcvDlCYyuLA/rJN9qsPLwtl+SXRGydUZBQ== X-Received: by 2002:a5d:430e:: with SMTP id h14mr12201567wrq.18.1570208377075; Fri, 04 Oct 2019 09:59:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 29/29] target/i386/kvm: Silence warning from Valgrind about uninitialized bytes Date: Fri, 4 Oct 2019 18:59:23 +0200 Message-Id: <1570208363-11948-9-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1570208363-11948-1-git-send-email-pbonzini@redhat.com> References: <1570208363-11948-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth When I run QEMU with KVM under Valgrind, I currently get this warning: Syscall param ioctl(generic) points to uninitialised byte(s) at 0x95BA45B: ioctl (in /usr/lib64/libc-2.28.so) by 0x429DC3: kvm_ioctl (kvm-all.c:2365) by 0x51B249: kvm_arch_get_supported_msr_feature (kvm.c:469) by 0x4C2A49: x86_cpu_get_supported_feature_word (cpu.c:3765) by 0x4C4116: x86_cpu_expand_features (cpu.c:5065) by 0x4C7F8D: x86_cpu_realizefn (cpu.c:5242) by 0x5961F3: device_set_realized (qdev.c:835) by 0x7038F6: property_set_bool (object.c:2080) by 0x707EFE: object_property_set_qobject (qom-qobject.c:26) by 0x705814: object_property_set_bool (object.c:1338) by 0x498435: pc_new_cpu (pc.c:1549) by 0x49C67D: pc_cpus_init (pc.c:1681) Address 0x1ffeffee74 is on thread 1's stack in frame #2, created by kvm_arch_get_supported_msr_feature (kvm.c:445) It's harmless, but a little bit annoying, so silence it by properly initializing the whole structure with zeroes. Signed-off-by: Thomas Huth Signed-off-by: Paolo Bonzini --- target/i386/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index be4bbfb..11b9c85 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -188,7 +188,7 @@ static int kvm_get_tsc(CPUState *cs) struct { struct kvm_msrs info; struct kvm_msr_entry entries[1]; - } msr_data; + } msr_data =3D {}; int ret; =20 if (env->tsc_valid) { @@ -448,7 +448,7 @@ uint64_t kvm_arch_get_supported_msr_feature(KVMState *s= , uint32_t index) struct { struct kvm_msrs info; struct kvm_msr_entry entries[1]; - } msr_data; + } msr_data =3D {}; uint64_t value; uint32_t ret, can_be_one, must_be_one; =20 --=20 1.8.3.1