[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 11/40] hw/xen: Use the IEC binary prefix defi
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH v4 11/40] hw/xen: Use the IEC binary prefix definitions |
Date: |
Wed, 13 Jun 2018 17:02:53 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 06/13/2018 04:31 PM, Richard Henderson wrote:
> On 06/13/2018 02:13 AM, Eric Blake wrote:
>> Or spell it UINT64_C(1) if you don't want a cast.
>
> Not unsigned is what I want most.
I used both of your suggestions, but now new format string errors
appeared due to ram_addr_t being unsigned, so code cleaned using
MachineState->ram_size now complains.
include/exec/cpu-common.h:53:typedef uintptr_t ram_addr_t;
include/hw/boards.h:259: ram_addr_t ram_size;
Is the following snippet OK?
/* allocate RAM */
- if (ram_size > (2048u << 20)) {
- error_report("Too much memory for this machine: %dMB, maximum
2048MB",
- ((unsigned int)ram_size / (1 << 20)));
+ if (ram_size > 2 * GiB) {
+ error_report("Too much memory for this machine: %luMB, maximum
2048MB",
+ ram_size / MiB);
exit(1);
}
- [Qemu-devel] [PATCH v4 07/40] hw/ivshmem: Use the IEC binary prefix definitions, (continued)
- [Qemu-devel] [PATCH v4 07/40] hw/ivshmem: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 08/40] hw/ipack: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 09/40] hw/scsi: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 10/40] hw/smbios: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 11/40] hw/xen: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-devel] [PATCH v4 12/40] hw/tpm: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-devel] [PATCH v4 13/40] hw/block: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-devel] [PATCH v4 15/40] hw/misc: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-devel] [PATCH v4 14/40] hw/display: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-devel] [PATCH v4 16/40] hw/riscv: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-devel] [PATCH v4 17/40] hw/m68k: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-devel] [PATCH v4 18/40] hw/sparc: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-devel] [PATCH v4 20/40] hw/hppa: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
[Qemu-devel] [PATCH v4 19/40] hw/s390x: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10