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/[email protected]/msg10912.html - https://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/2019-January/004844.html - https://www.mail-archive.com/[email protected]/msg691406.html Cc: [email protected] Cc: Ximin Luo <[email protected]> Cc: Martin Quinson <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: Jonathan Jackson <[email protected]> Suggested-by: Yunqiang Su <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- This patch is RFC because an upstream QEMU maintainer disagree with this approach, but I'm sending it so interested folks in the community (Debian or other) can test it. Previous discussion on Jiaxun Yang's patch: https://patchwork.kernel.org/patch/11416915/ --- hw/mips/malta.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 63c1d5ea5f..1695994493 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -1505,6 +1505,20 @@ static void malta_machine_strict_class_init(ObjectClass *oc, void *data) mmc->verify_dimm_sizes = true; }; +#ifdef TARGET_MIPS64 +static void malta_machine_unleashed_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc = MACHINE_CLASS(oc); + MaltaMachineClass *mmc = MALTA_MACHINE_CLASS(oc); + + mc->desc = "MIPS Malta Core LV (physically unlimited)"; + mc->block_default_type = IF_IDE; + mc->max_cpus = 16; + mc->default_cpu_type = MIPS_CPU_TYPE_NAME("20Kc"); + mmc->max_ramsize = 3 * GiB; +} +#endif /* TARGET_MIPS64 */ + static const TypeInfo malta_machine_types[] = { { .name = MACHINE_TYPE_NAME("malta"), @@ -1516,6 +1530,13 @@ static const TypeInfo malta_machine_types[] = { .parent = TYPE_MALTA_MACHINE, .class_init = malta_machine_strict_class_init, }, +#ifdef TARGET_MIPS64 + { + .name = MACHINE_TYPE_NAME("malta-unleashed"), + .parent = TYPE_MALTA_MACHINE, + .class_init = malta_machine_unleashed_class_init, + }, +#endif /* TARGET_MIPS64 */ { .name = TYPE_MALTA_MACHINE, .parent = TYPE_MACHINE, -- 2.21.3
