summary refs log tree commit diff stats
path: root/hw/s390x/sclp.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-06-25 09:42:11 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-07-02 15:41:14 +0200
commit393fc4c740d8d83d45bdbcd5f6a4cbc6be09b600 (patch)
treeb33656cfb7db1f0c26e866d4c970362e5fb445d1 /hw/s390x/sclp.c
parent0a2e467bcebfed27bd0d1cd17992938e8a3fbb66 (diff)
downloadfocaccia-qemu-393fc4c740d8d83d45bdbcd5f6a4cbc6be09b600.tar.gz
focaccia-qemu-393fc4c740d8d83d45bdbcd5f6a4cbc6be09b600.zip
hw/s390x: Use the IEC binary prefix definitions
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é <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20180625124238.25339-20-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/s390x/sclp.c')
-rw-r--r--hw/s390x/sclp.c3
1 files changed, 2 insertions, 1 deletions
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 @@
  */
 
 #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 = s390_set_memory_limit(machine->maxram_size, &hw_limit);
     if (ret == -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");
     }