From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
"Ximin Luo" <infinity0@debian.org>,
debian-mips@lists.debian.org, "Yunqiang Su" <ysu@wavecomp.com>,
qemu-devel@nongnu.org, "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Jonathan Jackson" <jnthjackson@gmail.com>,
"Aleksandar Markovic" <aleksandar.qemu.devel@gmail.com>,
"Martin Quinson" <mquinson@debian.org>,
"Igor Mammedov" <imammedo@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PATCH v2 6/6] hw/mips/malta: Introduce the 'malta-unleashed' 64-bit machine
Date: Wed, 1 Jul 2020 11:59:22 +0100 [thread overview]
Message-ID: <20200701105922.GG1427561@redhat.com> (raw)
In-Reply-To: <20200630145236.27529-7-f4bug@amsat.org>
On Tue, Jun 30, 2020 at 04:52:36PM +0200, Philippe Mathieu-Daudé wrote:
> Introduce the 'malta-unleashed' machine. This machine does not
> model any existing hardware (as the default 'malta' neither model
> a real hardware). The purpose of this machine is to allow user
> of the current 'malta' machine to use more RAM, as it has been
> reported to be useful for build farms.
>
> References:
> - https://www.mail-archive.com/debian-mips@lists.debian.org/msg10912.html
> - https://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/2019-January/004844.html
> - https://www.mail-archive.com/qemu-devel@nongnu.org/msg691406.html
I'm not convinced that there's any real value in adding the malta-strict
and malta-unleashed machine types.
If you want to closely model a real physical machine it doesn't matter
what the "max ram" setting says - you can just choose a "-m MB" value
to match the physical machine you want to model.
Similarly if users want to exceed what the physical machine would do
there's no compelling reason for QEMU to artificially prevent that
or force use of a different machine. Neither i440fx or q35 force
users to the max RAM limit of the physical machine they were originally
designed from. We have frequently just bumped the max limits in QEMU
for i440fx/q35 as we had users who requested a higher level.
IIUC, The current 2 GB limit is just a historical artifact from the
limited address space in 32-bit, which we don't have to be bound by
for 64-bit.
IOW, instead of adding new machine types I would think we can just
modify the existing limit for TARGET_MIPS64, by doing something akin
to:
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index d95926a89c..48e34da39c 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1247,9 +1247,14 @@ void mips_malta_init(MachineState *machine)
mips_create_cpu(machine, s, &cbus_irq, &i8259_irq);
/* allocate RAM */
- if (ram_size > 2 * GiB) {
+#ifdef TARGET_MIPS64
+#define MAX_RAM_MB 3056
+#else
+#define MAX_RAM_MB 2048
+#endif
+ if (ram_size > MAX_RAM_MB * MiB) {
error_report("Too much memory for this machine: %" PRId64 "MB,"
- " maximum 2048MB", ram_size / MiB);
+ " maximum " MAX_RAM_MB "MB", ram_size / MiB);
exit(1);
}
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2020-07-01 11:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-30 14:52 [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware Philippe Mathieu-Daudé
2020-06-30 14:52 ` [PATCH v2 1/6] hw/mips/malta: Trivial code movement Philippe Mathieu-Daudé
2020-06-30 14:52 ` [PATCH v2 2/6] hw/mips/malta: Register the machine as a TypeInfo Philippe Mathieu-Daudé
2020-06-30 14:52 ` [PATCH v2 3/6] hw/mips/malta: Introduce MaltaMachineClass::max_ramsize Philippe Mathieu-Daudé
2020-06-30 17:17 ` Philippe Mathieu-Daudé
2020-06-30 14:52 ` [PATCH v2 4/6] hw/mips/malta: Introduce the 'malta-strict' machine Philippe Mathieu-Daudé
2020-06-30 14:52 ` [PATCH v2 5/6] hw/mips/malta: Verify malta-strict machine uses correct DIMM sizes Philippe Mathieu-Daudé
2020-06-30 14:52 ` [PATCH v2 6/6] hw/mips/malta: Introduce the 'malta-unleashed' 64-bit machine Philippe Mathieu-Daudé
2020-07-01 10:59 ` Daniel P. Berrangé [this message]
2020-06-30 15:38 ` [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware Aleksandar Markovic
2020-06-30 16:46 ` Philippe Mathieu-Daudé
2020-06-30 16:55 ` Aleksandar Markovic
2020-06-30 17:16 ` Philippe Mathieu-Daudé
2020-06-30 17:28 ` Aleksandar Markovic
2020-06-30 19:51 ` Philippe Mathieu-Daudé
2020-06-30 20:36 ` Richard Henderson
2020-06-30 20:19 ` Thomas Huth
2020-07-01 10:49 ` Daniel P. Berrangé
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=20200701105922.GG1427561@redhat.com \
--to=berrange@redhat.com \
--cc=aleksandar.qemu.devel@gmail.com \
--cc=aleksandar.rikalo@syrmia.com \
--cc=aurelien@aurel32.net \
--cc=debian-mips@lists.debian.org \
--cc=f4bug@amsat.org \
--cc=imammedo@redhat.com \
--cc=infinity0@debian.org \
--cc=jiaxun.yang@flygoat.com \
--cc=jnthjackson@gmail.com \
--cc=mquinson@debian.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ysu@wavecomp.com \
/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).