hw/ppc: Use MachineClass->default_nic in the ppc machines

Mark the default NIC via the new MachineClass->default_nic setting
so that the machine-defaults code in vl.c can decide whether the
default NIC is usable or not (for example when compiling with the
"--without-default-devices" configure switch).

Message-Id: <20230512124033.502654-6-thuth@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Thomas Huth 2023-05-12 14:40:20 +02:00
parent 26a0802d1c
commit 053b708627
7 changed files with 16 additions and 5 deletions

View file

@ -99,6 +99,7 @@ static void e500plat_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = 32;
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("e500v2_v30");
mc->default_ram_id = "mpc8544ds.ram";
mc->default_nic = "virtio-net-pci";
machine_class_allow_dynamic_sysbus_dev(mc, TYPE_ETSEC_COMMON);
}