qemu-devel
[Top][All Lists]
Advanced

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

[PATCH 4/5] hw/loongarch: Set minimium memory size as 256M


From: Bibo Mao
Subject: [PATCH 4/5] hw/loongarch: Set minimium memory size as 256M
Date: Tue, 20 Feb 2024 20:41:25 +0800

The minium memory size for LoongArch UEFI bios is 256M, also some
test cases such as migration and qos uses parameter 256M.

Here set minium memory size for Loongarch VirtMachine with 256M,
also default memory size is changed with 256M.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
 hw/loongarch/virt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index a7d700497d..5bc332f4e3 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -815,8 +815,8 @@ static void virt_init(MachineState *machine)
         cpu_model = LOONGARCH_CPU_TYPE_NAME("la464");
     }
 
-    if (ram_size < 1 * GiB) {
-        error_report("ram_size must be greater than 1G.");
+    if (ram_size < 256 * MiB) {
+        error_report("ram_size must be greater than 256M.");
         exit(1);
     }
     create_fdt(vms);
@@ -1144,7 +1144,7 @@ static void virt_class_init(ObjectClass *oc, void *data)
     HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
 
     mc->init = virt_init;
-    mc->default_ram_size = 1 * GiB;
+    mc->default_ram_size = 256 * MiB;
     mc->default_cpu_type = LOONGARCH_CPU_TYPE_NAME("la464");
     mc->default_ram_id = "loongarch.ram";
     mc->max_cpus = LOONGARCH_MAX_CPUS;
-- 
2.39.3




reply via email to

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