qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Bibo Mao <maobibo@loongson.cn>, Song Gao <gaosong@loongson.cn>,
	Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>,
	Laurent Vivier <lvivier@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 4/5] hw/loongarch: Set minimium memory size as 256M
Date: Tue, 20 Feb 2024 17:47:08 +0100	[thread overview]
Message-ID: <5b6950e7-1b32-43b1-aff7-08f54b52a056@redhat.com> (raw)
In-Reply-To: <20240220124126.1164081-5-maobibo@loongson.cn>

On 20/02/2024 13.41, Bibo Mao wrote:
> 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;

While changing the minimum ram_size in the first hunk is certainly a good 
idea, you should maybe consider twice whether you also want to change the 
default_ram_size here. 256 MiB is often not enough to run a guest OS like 
Linux, so for most users it might be more convenient if you have a 
default_ram_size of 1GiB instead. At least that's what I've seen on other 
architectures. YMMV.

  Thomas



  reply	other threads:[~2024-02-20 16:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 12:41 [PATCH 0/5] Add migration test for loongarch64 Bibo Mao
2024-02-20 12:41 ` [PATCH 1/5] hw/loongarch: Rename LOONGARCH_MACHINE with VIRT_MACHINE Bibo Mao
2024-02-20 12:41 ` [PATCH 2/5] hw/loongarch: Rename LoongArchMachineState with VirtMachineState Bibo Mao
2024-02-20 12:41 ` [PATCH 3/5] hw/loongarch: Add compat machine for 9.0 Bibo Mao
2024-03-04  8:40   ` gaosong
2024-02-20 12:41 ` [PATCH 4/5] hw/loongarch: Set minimium memory size as 256M Bibo Mao
2024-02-20 16:47   ` Thomas Huth [this message]
2024-02-21  1:52     ` maobibo
2024-02-20 12:41 ` [PATCH 5/5] tests: Add migration test for loongarch64 Bibo Mao
2024-02-20 16:49   ` Thomas Huth
2024-02-21  3:01   ` Peter Xu
     [not found]     ` <2c298d69-f7d2-829f-c700-e6d6e1f86080@loongson.cn>
2024-02-21  4:14       ` Peter Xu
2024-02-21 21:24   ` Fabiano Rosas
2024-02-22  1:57     ` maobibo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b6950e7-1b32-43b1-aff7-08f54b52a056@redhat.com \
    --to=thuth@redhat.com \
    --cc=farosas@suse.de \
    --cc=gaosong@loongson.cn \
    --cc=lvivier@redhat.com \
    --cc=maobibo@loongson.cn \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).