From nobody Mon May 20 18:34:28 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1592424860; cv=none; d=zohomail.com; s=zohoarc; b=IycOTnI2uNt32nfwySeAXBbVsge2BLFppcSp7H56LEJxpjfON90fxkukuxxICWiY0CWxgzoodlMt2ci+ouBq+XHNn5CNA1QYtBKpkoPA5smosM3BKmiYCHrkJFqF43o31Mv1mrd/ePYHpWbcVH0uO/38AfmUmWGGr9Hnac9uMkw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592424860; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=p5hi1MkuSub3noZRf3bAcEWN2K9bQNMhFTxTeY7Mp2k=; b=WgujMmAXQT6+El+KAQre3e1L4rjtVznF0oveQkP1Fx6gmsfcXjQS6L7TBRcXC+2V7oTBgXxjLGh7QXO/CquY1G9GraSEjm7J2i02cDdoWs60MMsTcAZcsRGMDoG4wUHx37p9Ry7klPUizDFjug0ZlQPgQnYkWHpa8w4oEsCSAa4= ARC-Authentication-Results: i=1; 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 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 1592424859998319.78064108234094; Wed, 17 Jun 2020 13:14:19 -0700 (PDT) Received: from localhost ([::1]:33734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jleRu-0006u5-Es for importer@patchew.org; Wed, 17 Jun 2020 16:14:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jleQv-0005gN-Sw for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:17 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:38726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jleQt-0000Gh-RM for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:17 -0400 Received: by mail-pj1-x1044.google.com with SMTP id d6so1595865pjs.3 for ; Wed, 17 Jun 2020 13:13:15 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id h9sm659259pfe.32.2020.06.17.13.13.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 13:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p5hi1MkuSub3noZRf3bAcEWN2K9bQNMhFTxTeY7Mp2k=; b=nh3qFhU1W5Z+ANI6yzZJ515l6lYebwVwSPg5s+sGIsejz37TYYpnpVLKZytYhNVaFd HUR95MrdBBqrXH5GkONqS4xIiLGQ/2/1+RkCGWvuWPWBZ5DCfvN7QnYQ97rUaxIS+XNd yxPQRqk7PrFfTkXegQyBfRl76w1kM2vnDIOs16UPvOPGXOiXQU2YG9McfjZZMKumvsnJ UuiseNt0NaqM/antrFOTIaJa8Z4bxpXXiLv4eCzv7TzPUg+Pn1t/62iWPyUixZszl/XC 59jggqzK6CWzU/LYiPkHciPJGLVsgHGG0H4/YWRGNAj/LMgGmrm+wY3CnlOon4hb9nPy v/pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p5hi1MkuSub3noZRf3bAcEWN2K9bQNMhFTxTeY7Mp2k=; b=WJqxuaKurIo5XYSl2+rNK8ku0L3ojEDFDBvP+ednOO/m9vzCMPV1aMtCvZIdG33xOx Wbm75U4IbIrDgKWHGUpya2NUIrLKYW/PKA3BEoZnFqqDsLl871okfmHpg37psMYv10bE vjyU5UM9lVXkBFVbJ0lSMaokRQ1yzJngWDpJtEUh9ZDRjbMwwHL5oyxpl3/THlmKJPxp 0IFzORkM+WKW9xjIi005MH7E1QJXlyVQZX5RxtB7Xj2EpSoLMitBtWaBrTNDKQMql5vy jW2Lk+Nad6gZ3N/eDxlVOAI215OP325e596M1k2EBqG/kNx4LgS41BlgP6WKSDlpaSqM v52A== X-Gm-Message-State: AOAM532MXT00bnCeGhFbbB6oc9e5oqwQmyuyxjAT7Ec6B2eZReGJ9yXK eHewKCJAxKO/gLx42/4Xl3KisJwOp4w= X-Google-Smtp-Source: ABdhPJyJ2+UBZr2z1aCRfeMBXc4h0wPN6elYcuYlhyvA2aSnCDktMrm1RShTErSaszAfxN3czwh1Fw== X-Received: by 2002:a17:902:eb14:: with SMTP id l20mr708188plb.189.1592424793873; Wed, 17 Jun 2020 13:13:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 1/6] fpu/softfloat: Silence 'bitwise negation of boolean expression' warning Date: Wed, 17 Jun 2020 13:13:04 -0700 Message-Id: <20200617201309.1640952-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617201309.1640952-1-richard.henderson@linaro.org> References: <20200617201309.1640952-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::1044; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1044.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: philmd@redhat.com, Thomas Huth , alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 When building with clang version 10.0.0-4ubuntu1, we get: CC lm32-softmmu/fpu/softfloat.o fpu/softfloat.c:3365:13: error: bitwise negation of a boolean expression;= did you mean logical negation? [-Werror,-Wbool-operation] absZ &=3D ~ ( ( ( roundBits ^ 0x40 ) =3D=3D 0 ) & roundNearestEven ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fpu/softfloat.c:3423:18: error: bitwise negation of a boolean expression;= did you mean logical negation? [-Werror,-Wbool-operation] absZ0 &=3D ~ ( ( (uint64_t) ( absZ1<<1 ) =3D=3D 0 ) & roundNeares= tEven ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... fpu/softfloat.c:4273:18: error: bitwise negation of a boolean expression;= did you mean logical negation? [-Werror,-Wbool-operation] zSig1 &=3D ~ ( ( zSig2 + zSig2 =3D=3D 0 ) & roundNearestEven ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix by rewriting the fishy bitwise AND of two bools as an int. Suggested-by: Eric Blake Buglink: https://bugs.launchpad.net/bugs/1881004 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Reviewed-by: Eric Blake Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200528155420.9802-1-philmd@redhat.com> Signed-off-by: Richard Henderson --- fpu/softfloat.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 6c8f2d597a..5e9746c287 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -3362,7 +3362,9 @@ static int32_t roundAndPackInt32(bool zSign, uint64_t= absZ, } roundBits =3D absZ & 0x7F; absZ =3D ( absZ + roundIncrement )>>7; - absZ &=3D ~ ( ( ( roundBits ^ 0x40 ) =3D=3D 0 ) & roundNearestEven ); + if (!(roundBits ^ 0x40) && roundNearestEven) { + absZ &=3D ~1; + } z =3D absZ; if ( zSign ) z =3D - z; if ( ( absZ>>32 ) || ( z && ( ( z < 0 ) ^ zSign ) ) ) { @@ -3420,7 +3422,9 @@ static int64_t roundAndPackInt64(bool zSign, uint64_t= absZ0, uint64_t absZ1, if ( increment ) { ++absZ0; if ( absZ0 =3D=3D 0 ) goto overflow; - absZ0 &=3D ~ ( ( (uint64_t) ( absZ1<<1 ) =3D=3D 0 ) & roundNearest= Even ); + if (!(absZ1 << 1) && roundNearestEven) { + absZ0 &=3D ~1; + } } z =3D absZ0; if ( zSign ) z =3D - z; @@ -3480,7 +3484,9 @@ static int64_t roundAndPackUint64(bool zSign, uint64_= t absZ0, float_raise(float_flag_invalid, status); return UINT64_MAX; } - absZ0 &=3D ~(((uint64_t)(absZ1<<1) =3D=3D 0) & roundNearestEven); + if (!(absZ1 << 1) && roundNearestEven) { + absZ0 &=3D ~1; + } } =20 if (zSign && absZ0) { @@ -3603,7 +3609,9 @@ static float32 roundAndPackFloat32(bool zSign, int zE= xp, uint32_t zSig, status->float_exception_flags |=3D float_flag_inexact; } zSig =3D ( zSig + roundIncrement )>>7; - zSig &=3D ~ ( ( ( roundBits ^ 0x40 ) =3D=3D 0 ) & roundNearestEven ); + if (!(roundBits ^ 0x40) && roundNearestEven) { + zSig &=3D ~1; + } if ( zSig =3D=3D 0 ) zExp =3D 0; return packFloat32( zSign, zExp, zSig ); =20 @@ -3757,7 +3765,9 @@ static float64 roundAndPackFloat64(bool zSign, int zE= xp, uint64_t zSig, status->float_exception_flags |=3D float_flag_inexact; } zSig =3D ( zSig + roundIncrement )>>10; - zSig &=3D ~ ( ( ( roundBits ^ 0x200 ) =3D=3D 0 ) & roundNearestEven ); + if (!(roundBits ^ 0x200) && roundNearestEven) { + zSig &=3D ~1; + } if ( zSig =3D=3D 0 ) zExp =3D 0; return packFloat64( zSign, zExp, zSig ); =20 @@ -3983,8 +3993,9 @@ floatx80 roundAndPackFloatx80(int8_t roundingPrecisio= n, bool zSign, } if ( increment ) { ++zSig0; - zSig0 &=3D - ~ ( ( (uint64_t) ( zSig1<<1 ) =3D=3D 0 ) & roundNeares= tEven ); + if (!(zSig1 << 1) && roundNearestEven) { + zSig0 &=3D ~1; + } if ( (int64_t) zSig0 < 0 ) zExp =3D 1; } return packFloatx80( zSign, zExp, zSig0 ); @@ -4000,7 +4011,9 @@ floatx80 roundAndPackFloatx80(int8_t roundingPrecisio= n, bool zSign, zSig0 =3D UINT64_C(0x8000000000000000); } else { - zSig0 &=3D ~ ( ( (uint64_t) ( zSig1<<1 ) =3D=3D 0 ) & roundNea= restEven ); + if (!(zSig1 << 1) && roundNearestEven) { + zSig0 &=3D ~1; + } } } else { @@ -4270,7 +4283,9 @@ static float128 roundAndPackFloat128(bool zSign, int3= 2_t zExp, } if ( increment ) { add128( zSig0, zSig1, 0, 1, &zSig0, &zSig1 ); - zSig1 &=3D ~ ( ( zSig2 + zSig2 =3D=3D 0 ) & roundNearestEven ); + if ((zSig2 + zSig2 =3D=3D 0) && roundNearestEven) { + zSig1 &=3D ~1; + } } else { if ( ( zSig0 | zSig1 ) =3D=3D 0 ) zExp =3D 0; --=20 2.25.1 From nobody Mon May 20 18:34:28 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1592424928; cv=none; d=zohomail.com; s=zohoarc; b=DjLGa2X+wlOp3+AC45dY0nPiwi3TKjwj4OH06brr3s2Y/Z9xUC1KkMk0qm0LcDTnZGxItbhSqbxW97U6nUuU3DNR33RAjQ4cZHtAFc+DZt36CMCIbdlAVULt4m81Lp1+sMl+ffUszHm4rV4ku7LnD52zk98wV35vDzWmKvNA+cM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592424928; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pT/roiiQXi808rl/3E2k4RxicPI5Pg+au5vRpBZNebo=; b=dEI16zjYNLtjdDdXXLXleX8NkHWiONGfFguQctJdDg5J4smqVlndFEZeiLY4Gv7MCjgc+qYBlkSw74bEMZ+irU9ToxakL5JnwmCwmHhBenk3/6ofGVfbgdB13xcpuRp/Ds0KZBNQP8s67aOlMyvBOzZuRk1plYwWuRM3WyDUKTo= ARC-Authentication-Results: i=1; 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 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 1592424928594656.7833124642948; Wed, 17 Jun 2020 13:15:28 -0700 (PDT) Received: from localhost ([::1]:39000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jleT1-0000cO-Bv for importer@patchew.org; Wed, 17 Jun 2020 16:15:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jleQx-0005hl-6r for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:19 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:43422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jleQv-0000I8-0D for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:18 -0400 Received: by mail-pg1-x543.google.com with SMTP id h10so1803881pgq.10 for ; Wed, 17 Jun 2020 13:13:16 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id h9sm659259pfe.32.2020.06.17.13.13.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 13:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pT/roiiQXi808rl/3E2k4RxicPI5Pg+au5vRpBZNebo=; b=hHneAw/bbNDZ4duj1XldY/58SCN0Txwn3gNkO4jAgf07byTGH00SRA5+RS1mcKJQ25 l/xtplH8TbyfP0vvZuCANowlfBDYHCT0UJajqAdPpSg1N4E3U4R9dmp5rf83ag3LcQ7+ zH692X3uO0GoNU+tk++gMcZ/WystOX2cf19Rwfgaw+d8kM79ogZrDXxoSu7yRqplx8T3 tk1R3ndWHFGcsAjl2HdHr0IHPQ1fjKsU7JOMk0Mku+2y8h/wAZFmoyCGPMe8r4F9rjSX FekwiMMPLEOfEjFbps0YAmDnwSI3hTEke2qUkpZwwlPMEUFmM4nyUu6Ba7O8yRIjG+Fx FOyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pT/roiiQXi808rl/3E2k4RxicPI5Pg+au5vRpBZNebo=; b=b0lBk+y1BabPT9LmNiB4m3rs+9J2Fu58HZCkJwkYyP11g38Hp9IgcQ9C41SHzQrcBh crPjKFxcoxC/znXzheDhiyQO9WZZq9RCosS6Bbitz4C2Su8Mf7F14CLCGr9ijSn013He of+EvG0jAqFBUKIILBwY1syGZMn/Eb25JwLE+rnieR8LTsV+uKyP4dq76QkFIlrokP9V 58QkjztOzJXk//AG7l8eMxHxgypy0TaVJzvE9WaPRTQdb7B1PUu8W12G5PYBtIxhSGsI HybQqaqbCjAziFhTw0AFHi48zfZfdAbeVfKWyQ+G8rPrFVWw0jwG5QQnO8Brr1VqEazM e0nw== X-Gm-Message-State: AOAM532DuWGS3cUqDdkYleCr9q7OwyexnKwF3kwglmPncKCPpbPxjPYW UK2ikgjwXItkHgwHGOgRagjO6EQxxeI= X-Google-Smtp-Source: ABdhPJza9vw8nmtDNGRO1jH1bsUrAV84MOtHDYj9rEfB128/Wvi5PbMfOnvO/7AyjaNvKaXkiD2Acw== X-Received: by 2002:a63:5f41:: with SMTP id t62mr474112pgb.252.1592424795277; Wed, 17 Jun 2020 13:13:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 2/6] migration: fix xbzrle encoding rate calculation Date: Wed, 17 Jun 2020 13:13:05 -0700 Message-Id: <20200617201309.1640952-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617201309.1640952-1-richard.henderson@linaro.org> References: <20200617201309.1640952-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::543; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x543.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: philmd@redhat.com, Wei Wang , alex.bennee@linaro.org, "Dr . David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Wei Wang It's reported an error of implicit conversion from "unsigned long" to "double" when compiling with Clang 10. Simply make the encoding rate 0 when the encoded_size is 0. Fixes: e460a4b1a4 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Richard Henderson Reported-by: Richard Henderson Signed-off-by: Wei Wang Signed-off-by: Richard Henderson --- migration/ram.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 41cc530d9d..069b6e30bc 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -913,10 +913,8 @@ static void migration_update_rates(RAMState *rs, int64= _t end_time) unencoded_size =3D (xbzrle_counters.pages - rs->xbzrle_pages_prev)= * TARGET_PAGE_SIZE; encoded_size =3D xbzrle_counters.bytes - rs->xbzrle_bytes_prev; - if (xbzrle_counters.pages =3D=3D rs->xbzrle_pages_prev) { + if (xbzrle_counters.pages =3D=3D rs->xbzrle_pages_prev || !encoded= _size) { xbzrle_counters.encoding_rate =3D 0; - } else if (!encoded_size) { - xbzrle_counters.encoding_rate =3D UINT64_MAX; } else { xbzrle_counters.encoding_rate =3D unencoded_size / encoded_siz= e; } --=20 2.25.1 From nobody Mon May 20 18:34:28 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1592424934; cv=none; d=zohomail.com; s=zohoarc; b=BEcl8XlnvWgqHCF2CPsWO8Cu/oBqoZ9d908V/ZuUS2ioM6MR99xhaUVb7h/gFBDU5gNbA+PMNqCPKXg/e/zJHB/1FQAmS5msFlKaGgd6uMOCDgDaNvzn7af/GMplKh6DxisUSCAkhXUh2swn6DqbukzBCMYE+6AoOuRpghNPMKw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592424934; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4r5DXyEg7egNkGt1Nf25Vhx3ygxyImevDYCxFLgjPzU=; b=X3D+6ylAfNiIz+NyqJ6Ex7UD1P1zC9O5viz5E96i06UjvgFpoVtavWTCvl2lbbvsnU3/AiKu7xo1WaPhdv/hWljn47QFdWIE7uvH+r5ZuCWOPbt6eTOPFcBb/EXM+RzevPGihiaAvgWphCYnkBmPlKXs23has+N4Uz8mBd9oJRg= ARC-Authentication-Results: i=1; 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 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 1592424934277354.444242453584; Wed, 17 Jun 2020 13:15:34 -0700 (PDT) Received: from localhost ([::1]:39310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jleT7-0000ll-06 for importer@patchew.org; Wed, 17 Jun 2020 16:15:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jleQy-0005jT-9N for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:20 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:41742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jleQw-0000IJ-Cj for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:19 -0400 Received: by mail-pf1-x434.google.com with SMTP id 10so1670908pfx.8 for ; Wed, 17 Jun 2020 13:13:18 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id h9sm659259pfe.32.2020.06.17.13.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 13:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4r5DXyEg7egNkGt1Nf25Vhx3ygxyImevDYCxFLgjPzU=; b=nEHHWw3oibbmDoeUs+w54bTWDfuirqvZX9ZTZbPvYL13/GJskcUo2gN3f1TtE1fCkd HAe9L6kJtrghT5PJiDYAxg9ImPeBrLPmAPtOLW/m1hwocJ39ovvXqLgugnMNYaVNpNxl +HUzdxxfPGjIPrtbNZNSWKH0wDD7Sqbv9DJmAOVRXBch827VTDol7o1QaAC7iGHOqfcw oifQK6nfO+YVOM2JEc5KBuJ3dGfVFRZgPUL7MALJoBN22evHlkyvpMONuEdIYHp7ZBFx fcC5wLezqK3Lz1Dt2vpvtmoXR/Uc2d+GISRiuOsYbVCT8wjGrD1xRApMGP/GDHw4GZz9 B+TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4r5DXyEg7egNkGt1Nf25Vhx3ygxyImevDYCxFLgjPzU=; b=MNkdxI52w2TdAfHIQ0QL/JZYoJEbQuM0IsTn4ddFIRurylgWaPP0d0g772n8/wG4bG n46HwtOgOqXlTK5kacn9FCzqAuWxLNWRMC+6yn0XnStCCFoBseQ47OcuZ6q7bbCH3rdx EDllaOibXTJPjLr9AdZHEquvSpr/v9wKNE8T7HqUrcn6qxa8DlLdujT55De7toM945kK S9nX/WfUqxQSanf9+WeGMZRRKrUTpmeZrOS3tDbnzVI94aM32J2y5A2bqFTKR4pUMhoP qJoHw9ARAg9qpzWCROBNDKYsQ1wMnspQFNR/0BwV5dB7p4NOkXRHB4jhYOXykTSlQQ4v PqYw== X-Gm-Message-State: AOAM533PBCrEz3kn7PhsaOMq7M0QRyZXYJLp8lFFn6LBLjPztwsDGQQ5 kSnIpZsf4LBwMqSI/6hHeViI7wW6E7I= X-Google-Smtp-Source: ABdhPJwtORdKW9O/mKQ/goUvzPs5YXNQVM1j68Kg15hYWKdFo/xr3xTlqDdEUnoRdNcU9UXt7OgDDA== X-Received: by 2002:a62:a510:: with SMTP id v16mr455570pfm.154.1592424796560; Wed, 17 Jun 2020 13:13:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 3/6] configure: Clean up warning flag lists Date: Wed, 17 Jun 2020 13:13:06 -0700 Message-Id: <20200617201309.1640952-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617201309.1640952-1-richard.henderson@linaro.org> References: <20200617201309.1640952-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: philmd@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Use a helper function to tidy the assembly of gcc_flags. Separate flags that disable warnings from those that enable, and sort the disable warnings to the end. Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Suggested-by: Eric Blake Signed-off-by: Richard Henderson --- configure | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/configure b/configure index b01b5e3bed..a8bef95282 100755 --- a/configure +++ b/configure @@ -97,6 +97,11 @@ do_cxx() { do_compiler "$cxx" "$@" } =20 +# Append $2 to the variable named $1, with space separation +add_to() { + eval $1=3D\${$1:+\"\$$1 \"}\$2 +} + update_cxxflags() { # Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those # options which some versions of GCC's C++ compiler complain about @@ -2024,16 +2029,33 @@ if ! compile_prog "" "" ; then error_exit "You need at least GCC v4.8 or Clang v3.4 (or XCode Clang v= 5.1)" fi =20 -gcc_flags=3D"-Wold-style-declaration -Wold-style-definition -Wtype-limits" -gcc_flags=3D"-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifie= rs $gcc_flags" -gcc_flags=3D"-Wno-missing-include-dirs -Wempty-body -Wnested-externs $gcc_= flags" -gcc_flags=3D"-Wendif-labels -Wno-shift-negative-value $gcc_flags" -gcc_flags=3D"-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags" -gcc_flags=3D"-Wno-string-plus-int -Wno-typedef-redefinition $gcc_flags" -# Note that we do not add -Werror to gcc_flags here, because that would -# enable it for all configure tests. If a configure test failed due -# to -Werror this would just silently disable some features, -# so it's too error prone. +# Accumulate -Wfoo and -Wno-bar separately. +# We will list all of the enable flags first, and the disable flags second. +# Note that we do not add -Werror, because that would enable it for all +# configure tests. If a configure test failed due to -Werror this would +# just silently disable some features, so it's too error prone. + +warn_flags=3D +add_to warn_flags -Wold-style-declaration +add_to warn_flags -Wold-style-definition +add_to warn_flags -Wtype-limits +add_to warn_flags -Wformat-security +add_to warn_flags -Wformat-y2k +add_to warn_flags -Winit-self +add_to warn_flags -Wignored-qualifiers +add_to warn_flags -Wempty-body +add_to warn_flags -Wnested-externs +add_to warn_flags -Wendif-labels +add_to warn_flags -Wexpansion-to-defined + +nowarn_flags=3D +add_to nowarn_flags -Wno-initializer-overrides +add_to nowarn_flags -Wno-missing-include-dirs +add_to nowarn_flags -Wno-shift-negative-value +add_to nowarn_flags -Wno-string-plus-int +add_to nowarn_flags -Wno-typedef-redefinition + +gcc_flags=3D"$warn_flags $nowarn_flags" =20 cc_has_warning_flag() { write_c_skeleton; --=20 2.25.1 From nobody Mon May 20 18:34:28 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1592425031; cv=none; d=zohomail.com; s=zohoarc; b=PUJUpyPEcv0I/UCxDwuWfOGKzYrdcTd0dTEvSLvPyol0FPgrxGZ8LBy800xFSOeF+Dg9YIq4PU0XGOg2jTuVPOnE/cEed7jeH9AEMKdCutLBCNx7QDSU5kIDrzV7PjWh6LbRBIBHzqUcp8E/eBnhZ2RZoRUqQdEBGA/oSFiKEeM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592425031; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dEZjzTX6+ieOShJN0mJuNiYarK9Z1RqMn0K7hfGtGUM=; b=PeH6otjOKgq5Q4BexjIaixNEne/9bM4E0E6G9LBRh7fasrWUURbjrug6EdMeKPcLLt7Yo2r+VGVecrBg4FTOoVQdQ9vzP1E82ew/SJFKEBLCaPufwJrhZlnt1frViLBh6r84K1AqPEt2cfbswaZTXUSJFPRNteklY/nuEypzr4s= ARC-Authentication-Results: i=1; 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 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 159242503105419.39483711798357; Wed, 17 Jun 2020 13:17:11 -0700 (PDT) Received: from localhost ([::1]:42426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jleUf-0002n3-Nb for importer@patchew.org; Wed, 17 Jun 2020 16:17:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jleQz-0005lZ-Bo for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:21 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:40056) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jleQx-0000IY-Jq for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:21 -0400 Received: by mail-pf1-x443.google.com with SMTP id s23so1673124pfh.7 for ; Wed, 17 Jun 2020 13:13:19 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id h9sm659259pfe.32.2020.06.17.13.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 13:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dEZjzTX6+ieOShJN0mJuNiYarK9Z1RqMn0K7hfGtGUM=; b=rQb1ysMkQvxua3wjxBWBVlNxm8mA1y2GuGoNe7v2Ea/vjtPFkBP3twB/f2xL+aplvf WFzGp9+rvN2FCFlcTnDtxcOjL3Hp6IooSf2+rSqwk3WBblNLlIa3AUdZkWiqBi0XDxd/ ACqp4VQyGdX+u/BNzOqDkahJFzx+VTb6dlshKPax7D/J8TbyddhS8nfQ0SERgwFPL8Jl tgkjzRvLys0vI/Ia1NDB9MSpfVq4ALyJn9AiQ/+cvuVcdsiulRZ7Q47abzV6Wk9yJziw txkl7aZUEnTZyyY6i+H9LftplS0s6wj+XYVsJJlPHIB++VP5acVSL0BGirLSB0SaBACI K/hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dEZjzTX6+ieOShJN0mJuNiYarK9Z1RqMn0K7hfGtGUM=; b=TqAZ+xiSRGx8rKQa0U2HTLQH9HCfSt3m40J8oR3jSMtaf+rHSnt5cKD4oZHtdgK/by fn7iIeySRxsOICC8sW3vvGLdVniGDOtRiw4I36Xbp5JcuwewNzfhe9MADzTYLpaLaa34 VjTNMORj7EfHdtsyh9UmBy+onRIy6LhzsRuZ7uAoskoK3qN1UFllZewK1I7EmeBCriU0 +QbQFev2C93RRKQG/f9Rr6/U5D4x1q1XqHCe5eD+Mju98xQEq1JjNrqEL4kaC6olo1o9 sKGSyRV8GCoYmij4Ev6vDvovGL37NAWFBr6zMHpcuf9QxYyHQjvmuEOiLQSUMImfu2mZ UaZA== X-Gm-Message-State: AOAM532ay86p0DzgPnu/8cxrZ4ljveG3cZS4fZyopZtO8Xkx4a30VWmn vCgwndkr4A+6Rop6nbqSmLTAe2JK+dY= X-Google-Smtp-Source: ABdhPJx1QqIaUPF+bXK5GSgI5anA4G1edhjiqM7QiyMW1H7cSEvewAl9HM8q4wVDMl/D12z0LfFuww== X-Received: by 2002:a62:7c09:: with SMTP id x9mr402043pfc.287.1592424797860; Wed, 17 Jun 2020 13:13:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 4/6] configure: Disable -Wtautological-type-limit-compare Date: Wed, 17 Jun 2020 13:13:07 -0700 Message-Id: <20200617201309.1640952-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617201309.1640952-1-richard.henderson@linaro.org> References: <20200617201309.1640952-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::443; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: philmd@redhat.com, Thomas Huth , alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Clang 10 enables this by default with -Wtype-limit. All of the instances flagged by this Werror so far have been cases in which we really do want the compiler to optimize away the test completely. Disabling the warning will avoid having to add ifdefs to work around this. Cc: Eric Blake Buglink: https://bugs.launchpad.net/qemu/+bug/1878628 Acked-by: Thomas Huth Reviewed-by: Eric Blake Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index a8bef95282..5e27229f58 100755 --- a/configure +++ b/configure @@ -2054,6 +2054,7 @@ add_to nowarn_flags -Wno-missing-include-dirs add_to nowarn_flags -Wno-shift-negative-value add_to nowarn_flags -Wno-string-plus-int add_to nowarn_flags -Wno-typedef-redefinition +add_to nowarn_flags -Wno-tautological-type-limit-compare =20 gcc_flags=3D"$warn_flags $nowarn_flags" =20 --=20 2.25.1 From nobody Mon May 20 18:34:28 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1592424865; cv=none; d=zohomail.com; s=zohoarc; b=O8ygAujIaPTMFqgNDEOMAKtp2tCtnriF3HGVAvKO6i3tD8LoK4ua1M6yd+wcewTMkkvmIjdKtb1Voadf4MK/7Vsl0GdMXbjtGZj1PAWnr2j/MbWYBPjuNcNTrf5IqNB+ksHqwG/9J6dyiq3Vlyyte9umaGgEM9cKvhocQ1Otu2o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592424865; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KWMxYf4wO7x5jAN+/hqtYz9dCtHYS2Ay0EvaIwt8nhg=; b=LUGkpuATb1mqCdWhbMyeBIae956W8f4pHjTHD6kstlxN0RAMCYL4ggVS7HsIe46ZZHtHoPsOeKEkh9unSsDI+XYaKUEq5sUYsNNFWaEG7UrBWf4PDmEDCZxGHwAY0cpWTAM5U1ilsF3ApoxcH5czGNw2ElqtGoWyGpF1bxGdZF8= ARC-Authentication-Results: i=1; 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 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 1592424865562148.60374286612102; Wed, 17 Jun 2020 13:14:25 -0700 (PDT) Received: from localhost ([::1]:34194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jleS0-00075i-Ad for importer@patchew.org; Wed, 17 Jun 2020 16:14:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jleR0-0005oC-N7 for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:22 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:45922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jleQy-0000Il-R4 for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:22 -0400 Received: by mail-pg1-x542.google.com with SMTP id l63so1799795pge.12 for ; Wed, 17 Jun 2020 13:13:20 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id h9sm659259pfe.32.2020.06.17.13.13.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 13:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KWMxYf4wO7x5jAN+/hqtYz9dCtHYS2Ay0EvaIwt8nhg=; b=K5lpsjvBl0D/4ebX+bdfX/ktGrI2K+BLRJWLwmDpcGmPQgX3zNuq4A/MF8qNzYIh2s e2IcBP2+pkHUtepLBDf/aKzFPW1z5D3qv/hpjCpLrFOziZ4kM7NFRlLapDHg0b9S4wMI Hu9KeMGWXu9VZURu7BJRZDQhjiUeQkTGKXQjfN3T7PTNPEx9RmW0n/Gs1vt+dsDZWZLj JK82MDkVWyo1Ux7GGz3jOYchrULUtwxT6sXZlTZe9+LS7u+kNpVlxr0yXn58Q56If3cD b4nigH/yo86WcSCzq5VF2PopQ+mVIFjm2+cFlMbP2sr3FsTNDdNjqhQ+e29yYjN7v7Jd x/Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KWMxYf4wO7x5jAN+/hqtYz9dCtHYS2Ay0EvaIwt8nhg=; b=V/pOUkH44UcgFg//0lcuXtcFL1kymKOhYHqBmAdoMlU75zzcQDY2GB21K59SK4rP5B PBkgLQuHKj6+VkbslwlxMf0eipVJX3YlkVB7b6loB3sNaB8nP0l/OqOnHD64DK58kWXv whBpbMEWn/EhLcJw0CmuHT2FEvcrL84/+oXhVMwRhxjM5bFmOY6D++4DKHGrz5TuBJBb DseL5MZjSt0w18MaQVX9AcRwCDhPeldFNJowMyK/SjASvw/4QvObDx1srJf9BKL9pxYL rh+0sHLLHPfZU7BwYACYG6OAvyQYq5SsQBaz24aPh+h8N4u/Ksxpbzx50NnZbU5mlwal Aymg== X-Gm-Message-State: AOAM533XGCVFs3e2ETRs+Ou3MVYgibec8K6TkBiXNxq9OhbdxQ+690jr NDqCFb/bprJtbfP9huGGA0TGY1Fcuv4= X-Google-Smtp-Source: ABdhPJxTNqdRzbkcnz1YeBosTkOLu1f3vOoZVlOs10FPpG55eK0wIRXkyc0tH3dUzn3Kx88HvfAzPA== X-Received: by 2002:aa7:8bd0:: with SMTP id s16mr466871pfd.80.1592424799099; Wed, 17 Jun 2020 13:13:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 5/6] configure: Add -Wno-psabi Date: Wed, 17 Jun 2020 13:13:08 -0700 Message-Id: <20200617201309.1640952-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617201309.1640952-1-richard.henderson@linaro.org> References: <20200617201309.1640952-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::542; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x542.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: philmd@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) On aarch64, gcc 9.3 is generating qemu/exec.c: In function =E2=80=98address_space_translate_iommu=E2=80=99: qemu/exec.c:431:28: note: parameter passing for argument of type \ =E2=80=98MemTxAttrs=E2=80=99 {aka =E2=80=98struct MemTxAttrs=E2=80=99} ch= anged in GCC 9.1 and many other repetitions. This structure, and the functions amongst which it is passed, are not part of a QEMU public API. Therefore we do not care how the compiler passes the argument, so long as the compiler is self-consistent. The only portion of QEMU which does have a public api, and so must have a stable abi, is "qemu/plugin.h". We test this by forcing -Wpsabi in tests/plugin/Makefile. Buglink: https://bugs.launchpad.net/qemu/+bug/1881552 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- configure | 1 + tests/plugin/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 5e27229f58..ba88fd1824 100755 --- a/configure +++ b/configure @@ -2055,6 +2055,7 @@ add_to nowarn_flags -Wno-shift-negative-value add_to nowarn_flags -Wno-string-plus-int add_to nowarn_flags -Wno-typedef-redefinition add_to nowarn_flags -Wno-tautological-type-limit-compare +add_to nowarn_flags -Wno-psabi =20 gcc_flags=3D"$warn_flags $nowarn_flags" =20 diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile index b3250e2504..3a50451428 100644 --- a/tests/plugin/Makefile +++ b/tests/plugin/Makefile @@ -17,7 +17,7 @@ NAMES +=3D lockstep =20 SONAMES :=3D $(addsuffix .so,$(addprefix lib,$(NAMES))) =20 -QEMU_CFLAGS +=3D -fPIC +QEMU_CFLAGS +=3D -fPIC -Wpsabi QEMU_CFLAGS +=3D -I$(SRC_PATH)/include/qemu =20 all: $(SONAMES) --=20 2.25.1 From nobody Mon May 20 18:34:28 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1592425133; cv=none; d=zohomail.com; s=zohoarc; b=nO75j6iKv8FP4Sr82nn9fKXH+5wTDa9QoWChgExgoDsx9hAZNzywSZ/FIcAVv9QXwL23EUamRQivO3bv2wcajPNWX4uRoy3VZieyoh32KPlzxUNKnB/wbcOeMQ2jvYFCydaPx6KG/JxxvigSK0vk53RHDj9hUBAeqjFHMolrU/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592425133; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iB6WP5osX7GLomupFEwKpIq8rnoF86CLVB0urJpiacU=; b=jgum89FMaUxH7Lykx4UwzI1UHdTqdhZelW5/uMqPCISztcR39ox59kAk/vLHq8OHZI9qHA73yyOdMh2b9i4dJxQbLyMEKCwH918rT8l/aWnQP0pQO54+BbH8fsRce4xO+vRMpMplO6+BJccWAIEJlsCeVpJMwDimE2R/TaTHXDA= ARC-Authentication-Results: i=1; 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 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 159242513333689.50609035905427; Wed, 17 Jun 2020 13:18:53 -0700 (PDT) Received: from localhost ([::1]:44600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jleWD-0003kv-Mj for importer@patchew.org; Wed, 17 Jun 2020 16:18:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jleR1-0005pI-Dg for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:23 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:39050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jleQz-0000Ix-Tb for qemu-devel@nongnu.org; Wed, 17 Jun 2020 16:13:23 -0400 Received: by mail-pl1-x631.google.com with SMTP id v24so1448175plo.6 for ; Wed, 17 Jun 2020 13:13:21 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id h9sm659259pfe.32.2020.06.17.13.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 13:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iB6WP5osX7GLomupFEwKpIq8rnoF86CLVB0urJpiacU=; b=DAtHA5kTyMCz43/pWlYuyy3VDgHr2r98rnL9NHkyMCVlc9gtocDnahKJwjYt35J2UN VPR4PfA6+pSZ39viDfyzm9zuyG1T/jRBSCzY6HPNPgyWC8rMjLu/WSmL4QrMVqeAhvjQ GD6XUYlWXR3TRzPr1zsM+duh5/J4DKWvrXCxPkTNv8fVPScAqP9anyDj/L+QtvAHBs8i yyDJJTk27dkRLcIdwyHqeZVvAYQdkhRMRqoc2ZOMGKc5H8wmTOVWVqf3u6U7gXLvrNd7 8T73LBjEcGTHKtr3B4soPomTcNyiBJed84EO8N42Xu4R5ANkCon97P0c8ioPCxby4zi8 ILyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iB6WP5osX7GLomupFEwKpIq8rnoF86CLVB0urJpiacU=; b=RlZswqhPARB9mFp7V2oe1tGIEvk8a8BxAkLX5HS44090XR5/fnBlcj0J1AoT6SFo0B EmSflfYIepmjQOv1imY78vkN9leYYrXDSgUoxkdVdF5dxx0gwwyn6noswdnyrhsmlaM4 RqLn3S2ZjB4klXeihHYISoQrUvgUQnyc6U+YnPzjw1gPaX0T/1+LcN7t+WsleEtTHZiL nOq85BHYEflvfLx9gy6z4J4zEeSeKTd4Rmgbfn8L3ZFGRFN0mP/r3JKSkg5aFwWg2CgV xPR7MAWWD6JZzBNIM878pDc+qOaNodM2zizbgs9eES8fwaEKYRNpyKfVtMgZWxJXTgvk noLA== X-Gm-Message-State: AOAM532sH8RkAZnhJQOeSlm0d7NF/AYVo3LwZrISZxCfCvbavoODcYaE V0PedszMm/H/A5Kx7Xz7TIJEMCvahmY= X-Google-Smtp-Source: ABdhPJz+cmAnYedg5soQVWclwa2TLNfMa13oMpur9yPU8vhS/KbNbwodLh8tSpnwWP+3ovcii705xA== X-Received: by 2002:a17:90a:fa8f:: with SMTP id cu15mr773414pjb.9.1592424800277; Wed, 17 Jun 2020 13:13:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 6/6] qht: Fix threshold rate calculation Date: Wed, 17 Jun 2020 13:13:09 -0700 Message-Id: <20200617201309.1640952-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200617201309.1640952-1-richard.henderson@linaro.org> References: <20200617201309.1640952-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: philmd@redhat.com, "Emilio G . Cota" , alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) tests/qht-bench.c:287:29: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion] *threshold =3D rate * UINT64_MAX; ~ ^~~~~~~~~~ Fix this by splitting the 64-bit constant into two halves, each of which is individually perfectly representable, the sum of which produces the correct arithmetic result. Cc: Emilio G. Cota Reported-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- Question: Should we really be scaling by UINT64_MAX? The comparisons against info->r mean that 1.0 is exceedingly unlikely to hit. Or if that is supposed to be the point, why is is the test r >=3D threshold not r > threshold where, if threshold =3D=3D UINT64_MAX, there is zero chance of the test being true for 1.0. --- tests/qht-bench.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qht-bench.c b/tests/qht-bench.c index e3b512f26f..eb88a90137 100644 --- a/tests/qht-bench.c +++ b/tests/qht-bench.c @@ -284,7 +284,8 @@ static void do_threshold(double rate, uint64_t *thresho= ld) if (rate =3D=3D 1.0) { *threshold =3D UINT64_MAX; } else { - *threshold =3D rate * UINT64_MAX; + *threshold =3D (rate * 0xffff000000000000ull) + + (rate * 0x0000ffffffffffffull); } } =20 --=20 2.25.1