From nobody Mon Feb 9 04:27:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529932295819622.6918467292496; Mon, 25 Jun 2018 06:11:35 -0700 (PDT) Received: from localhost ([::1]:46804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXRHL-0006xg-3G for importer@patchew.org; Mon, 25 Jun 2018 09:11:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXQqk-0001ky-6D for qemu-devel@nongnu.org; Mon, 25 Jun 2018 08:44:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXQqj-0007uL-1a for qemu-devel@nongnu.org; Mon, 25 Jun 2018 08:44:06 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:39699) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXQqi-0007u0-PV; Mon, 25 Jun 2018 08:44:04 -0400 Received: by mail-qt0-x243.google.com with SMTP id c23-v6so2826978qtn.6; Mon, 25 Jun 2018 05:44:04 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id m15-v6sm12549562qtm.84.2018.06.25.05.44.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 05:44:03 -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 :mime-version:content-transfer-encoding; bh=aQ3j/YvZkmWMsIul5k1XIP5Icic3DirFF7HExLy1BdA=; b=CwzGmZAfzfbSyVSvYbHCrk8WVdvk7lJq56bd85eAuM9LHSn/YMiLudXG8PGIIA3S4/ H4dUX7abMmSYIHX4fH6tRhu6lUCXS5E27+g4GBjqjK6Asu3Z5z1TFhaQKwEawtTV4vFa piyoqdwN/xSdXd+7coITvfYR3SMJo7R4HQZQzPG1MKPgzuDP1dOctPbNneg+ksfUfaaW aFrj3CDPpGAXT4gfyuAiEgOkHhKSZTPU6GvyexikyE/R2DBXWTw+VSPGjj55RXPWK0CF wpGH/7SdJIuwiRusAAlUvg0c93gatuV9hgJgxW+wUJF741TCfOQnjp/twfGMwBgkSFtj BF2g== 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:mime-version:content-transfer-encoding; bh=aQ3j/YvZkmWMsIul5k1XIP5Icic3DirFF7HExLy1BdA=; b=kCpEe00bpVOdk24T15y5+tvIE+xrT0vR59XTSq6/PmYsQ3VvoSSUZf1joThHyRd1WV IyuOQTZpRd+iBWa/U+k182IX8FVUM4bqlH3SdemtLM15sZjkHOWt6Vqxk/Qy6qPFg0ET 9kpc1WHA7cPymdmHn2NfJPfgdEXl2pGUu18ySKTMY4dY4oTsPmrrW0MY6egwhnHoV0RT WcphsEK+x/nF5JR8vtbFwgEhWu8NdyrVJgM7BvwkbuY9VOCB0KckUWHYqrqTy0mbzj8C z7uA87DtfqOCflsYbJ+vpl3mn/Lz1s4jxr/A+ImDe5PZpOYDGryIkyvZ9XgY6vveXJk/ wByQ== X-Gm-Message-State: APt69E28HdUigAEIneQraXvH25ROzngRSKVvdNXIeaesOEShGcPkJUgH i9B7s2eHu1DB1TLmpiJouwg= X-Google-Smtp-Source: AAOMgpfhT5kQ86KhXdXyE1am9VgJD50T48zBjVNnqpE8kvdCQJBz1/jRoUDq/1uQ4CEWRi5T1VZ4Zg== X-Received: by 2002:a0c:e24a:: with SMTP id x10-v6mr10837209qvl.244.1529930644201; Mon, 25 Jun 2018 05:44:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Thomas Huth , Stefan Weil Date: Mon, 25 Jun 2018 09:42:11 -0300 Message-Id: <20180625124238.25339-20-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180625124238.25339-1-f4bug@amsat.org> References: <20180625124238.25339-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PATCH v5 19/46] hw/s390x: Use the IEC binary prefix definitions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, David Hildenbrand , qemu-trivial@nongnu.org, Cornelia Huck , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Borntraeger , "open list:S390" , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Acked-by: Cornelia Huck --- hw/s390x/s390-skeys.c | 3 ++- hw/s390x/s390-stattrib.c | 3 ++- hw/s390x/sclp.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 76241c240e..15f7ab0e53 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -10,6 +10,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/units.h" #include "hw/boards.h" #include "hw/s390x/storage-keys.h" #include "qapi/error.h" @@ -19,7 +20,7 @@ #include "sysemu/kvm.h" #include "migration/register.h" =20 -#define S390_SKEYS_BUFFER_SIZE 131072 /* Room for 128k storage keys */ +#define S390_SKEYS_BUFFER_SIZE (128 * KiB) /* Room for 128k storage keys = */ #define S390_SKEYS_SAVE_FLAG_EOS 0x01 #define S390_SKEYS_SAVE_FLAG_SKEYS 0x02 #define S390_SKEYS_SAVE_FLAG_ERROR 0x04 diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c index 70b95550a8..5161a1659b 100644 --- a/hw/s390x/s390-stattrib.c +++ b/hw/s390x/s390-stattrib.c @@ -10,6 +10,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/units.h" #include "hw/boards.h" #include "cpu.h" #include "migration/qemu-file.h" @@ -20,7 +21,7 @@ #include "qapi/error.h" #include "qapi/qmp/qdict.h" =20 -#define CMMA_BLOCK_SIZE (1 << 10) +#define CMMA_BLOCK_SIZE (1 * KiB) =20 #define STATTR_FLAG_EOS 0x01ULL #define STATTR_FLAG_MORE 0x02ULL diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 047d577313..bd2a024efd 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -13,6 +13,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/units.h" #include "qapi/error.h" #include "cpu.h" #include "sysemu/sysemu.h" @@ -289,7 +290,7 @@ static void sclp_realize(DeviceState *dev, Error **errp) ret =3D s390_set_memory_limit(machine->maxram_size, &hw_limit); if (ret =3D=3D -E2BIG) { error_setg(&err, "host supports a maximum of %" PRIu64 " GB", - hw_limit >> 30); + hw_limit / GiB); } else if (ret) { error_setg(&err, "setting the guest size failed"); } --=20 2.18.0