qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 43/86] hppa: drop RAM size fixup


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 43/86] hppa: drop RAM size fixup
Date: Tue, 31 Dec 2019 16:44:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 12/31/19 2:03 PM, Igor Mammedov wrote:
If user provided non-sense RAM size, board will complain and
continue running with max RAM size supported.
Also RAM is going to be allocated by generic code, so it won't be
possible for board to fix things up for user.

Make it error message and exit to force user fix CLI,
instead of accepting non-sense CLI values.

Signed-off-by: Igor Mammedov <address@hidden>
---
  hw/hppa/machine.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 5d0de26..25f5afc 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -92,7 +92,8 @@ static void machine_hppa_init(MachineState *machine)
/* Limit main memory. */
      if (ram_size > FIRMWARE_START) {
-        machine->ram_size = ram_size = FIRMWARE_START;
+        error_report("RAM size more than %d is not supported", FIRMWARE_START);

$ qemu-system-hppa -m 3841m
qemu-system-hppa: invalid accelerator kvm
qemu-system-hppa: falling back to tcg
qemu-system-hppa: RAM size more than -268435456 is not supported

Instead of using qemu_strtosz_MiB on FIRMWARE_START or unsigned format, we can simply use "RAM size more than 3840m is not supported". Is that OK with you?

Tested-by: Philippe Mathieu-Daudé <address@hidden>

With correct output:
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

+        exit(EXIT_FAILURE);
      }
/* Main memory region. */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]