From nobody Sun Feb 8 00:03:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1648674415663411.8115764273574; Wed, 30 Mar 2022 14:06:55 -0700 (PDT) Received: from localhost ([::1]:50004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZfWo-0006qp-AU for importer@patchew.org; Wed, 30 Mar 2022 17:06:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZfUx-0003MT-5o; Wed, 30 Mar 2022 17:04:59 -0400 Received: from [2001:4860:4864:20::2d] (port=35992 helo=mail-oa1-x2d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZfUv-0003JQ-PN; Wed, 30 Mar 2022 17:04:58 -0400 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-df22f50e0cso6068174fac.3; Wed, 30 Mar 2022 14:04:57 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:abe8:ed:2c78:ab0c:7946]) by smtp.gmail.com with ESMTPSA id t19-20020a05687044d300b000de4e33171csm9988617oai.34.2022.03.30.14.04.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 14:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hp7pjMYBS7VgheOvT8RWUomiLcmb/XAPpz8sgeGR9mI=; b=qXjUYGgGpEJNJH2PrME6R5JtP+fs33RH6v4YzNj+g8IGVznQLl5/2cGk+Su6/lJYfw qMBWI1Zoy1waXRdgcZagpx0dz+0XTrIJnpDhyZEmBuVTD0ikxg3K4AzCIBtWiJzaYcIb K233woca2vZxuefKnUt9Pu6eMDh6g9Ju+ZxJhJc0xX93ewo0rR84pl2qoLZWv+vol2RD x+YbQ01QHjqbuvE/Mx20xif2DB+BJVt52EdtRih33CMtDKCvNqV+yVU7mQ26JS8qntYV 4gfLcPzXwAqxPf0JUIVwnUCMl5TEvCodhXboHpSpDF64nREMOeBqYeqlPwJwsfPdv8op mAsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hp7pjMYBS7VgheOvT8RWUomiLcmb/XAPpz8sgeGR9mI=; b=R2cgw29Iw2ar3nHQ0kwRdQneoAxTu+V5FCr7glpTQ0k6sA6Ks5HSAxKyHrvJ2oiSd6 oJAN/lmtlpY/RwjZTlze5CePgH4HZ2mYB7nd/srCSE9IJk/THR+2iEnJ4iW6AEWB2ZNq ZED2/CuHxrTUXfVxgzFCCGO3rFHz4NdIr75B1oz9bknPKSwFD3ur7wAU4povs13AwyKk wKVa7m3YByljuxtmAN6nkV6MvEkRvmiNZRcRHgO3wY4HVV+0WMisNp/NOOOA/f2klbO3 ZJGMj62eV7+49DH7aImiLBtYcR5thPh9WfFNXLQcBvAQyp4YQRlMLoQvkMDgYMmpx4OG abaw== X-Gm-Message-State: AOAM532ioqus+ksziNYwjRq7LhvnoeOFeHVhyLZEH36Pz7sBf0SqYEFH m5RrO+YE7focZRXxYCc4EHdWEDAyLwo= X-Google-Smtp-Source: ABdhPJzN7JDIbDAlUFIK8meFg4rjsxpKKOWiY/SYpgg4jU+Uf6I4A1AkgEka1iEMtdkdzqTUsdHPCw== X-Received: by 2002:a05:6871:5cd:b0:de:b44:5045 with SMTP id v13-20020a05687105cd00b000de0b445045mr928812oan.193.1648674296112; Wed, 30 Mar 2022 14:04:56 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr() Date: Wed, 30 Mar 2022 18:04:41 -0300 Message-Id: <20220330210443.597500-3-danielhb413@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220330210443.597500-1-danielhb413@gmail.com> References: <20220330210443.597500-1-danielhb413@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:4860:4864:20::2d (failed) Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2001:4860:4864:20::2d; envelope-from=danielhb413@gmail.com; helo=mail-oa1-x2d.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Henrique Barboza , qemu-ppc@nongnu.org, clg@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1648674417781100001 Content-Type: text/plain; charset="utf-8" '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: =3D=3D55240=3D=3D Thread 1: =3D=3D55240=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D55240=3D=3D at 0xB011E4: kvmppc_enable_cap_large_decr (kvm.c:2546) =3D=3D55240=3D=3D by 0x92F28F: cap_large_decr_cpu_apply (spapr_caps.c:52= 3) =3D=3D55240=3D=3D by 0x930C37: spapr_caps_cpu_apply (spapr_caps.c:921) =3D=3D55240=3D=3D by 0x955D3B: spapr_reset_vcpu (spapr_cpu_core.c:73) =3D=3D55240=3D=3D by 0x95612B: spapr_cpu_core_reset (spapr_cpu_core.c:20= 9) =3D=3D55240=3D=3D by 0x95619B: spapr_cpu_core_reset_handler (spapr_cpu_c= ore.c:218) =3D=3D55240=3D=3D by 0xD3605F: qemu_devices_reset (reset.c:69) =3D=3D55240=3D=3D by 0x92112B: spapr_machine_reset (spapr.c:1641) =3D=3D55240=3D=3D by 0x4FBD63: qemu_system_reset (runstate.c:444) =3D=3D55240=3D=3D by 0x62812B: qdev_machine_creation_done (machine.c:124= 7) =3D=3D55240=3D=3D by 0x5064C3: qemu_machine_creation_done (vl.c:2725) =3D=3D55240=3D=3D by 0x5065DF: qmp_x_exit_preconfig (vl.c:2748) =3D=3D55240=3D=3D Uninitialised value was created by a stack allocation =3D=3D55240=3D=3D at 0xB01158: kvmppc_enable_cap_large_decr (kvm.c:2540) Init 'lpcr' to avoid this warning. Signed-off-by: Daniel Henrique Barboza --- target/ppc/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index ce1b926e8c..9fb13b23d8 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2539,7 +2539,7 @@ int kvmppc_get_cap_large_decr(void) int kvmppc_enable_cap_large_decr(PowerPCCPU *cpu, int enable) { CPUState *cs =3D CPU(cpu); - uint64_t lpcr; + uint64_t lpcr =3D 0; =20 kvm_get_one_reg(cs, KVM_REG_PPC_LPCR_64, &lpcr); /* Do we need to modify the LPCR? */ --=20 2.35.1