diff mbox series

[3/7] hw/mips/malta: Rename 'malta' machine as 'malta-virt'

Message ID 20200630081322.19146-4-f4bug@amsat.org
State New
Headers show
Series hw/mips/malta: Rework to allow more than 2GB of RAM on 64-bit | expand

Commit Message

Philippe Mathieu-Daudé June 30, 2020, 8:13 a.m. UTC
We want to model the real physical Malta board. The current model
does not have the physical restrictions real hardware have.
Rename the current machine as 'malta-virt'. To not disrupt command
line users, keep the 'malta' machine name as an alias.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/mips/malta.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 66172f0c82..f8fc567532 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1439,8 +1439,16 @@  static void malta_machine_class_init(ObjectClass *oc, void *data)
 {
     MachineClass *mc = MACHINE_CLASS(oc);
 
-    mc->desc = "MIPS Malta Core LV";
     mc->init = mips_malta_init;
+    mc->default_ram_id = "mips_malta.ram";
+}
+
+static void malta_machine_virt_class_init(ObjectClass *oc, void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+
+    mc->desc = "MIPS Malta Core LV (no physical limitations)";
+    mc->alias = "malta";
     mc->block_default_type = IF_IDE;
     mc->max_cpus = 16;
     mc->is_default = true;
@@ -1449,13 +1457,13 @@  static void malta_machine_class_init(ObjectClass *oc, void *data)
 #else
     mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
 #endif
-    mc->default_ram_id = "mips_malta.ram";
 }
 
 static const TypeInfo malta_machine_types[] = {
     {
-        .name          = MACHINE_TYPE_NAME("malta"),
+        .name          = MACHINE_TYPE_NAME("malta-virt"),
         .parent        = TYPE_MALTA_MACHINE,
+        .class_init    = malta_machine_virt_class_init,
     }, {
         .name          = TYPE_MALTA_MACHINE,
         .parent        = TYPE_MACHINE,