diff options
author | Thomas Huth <thuth@redhat.com> | 2023-05-12 14:40:20 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2023-05-22 09:44:22 +0200 |
commit | 053b7086274487c31a136940c75a665211bc2b4a (patch) | |
tree | 8b14ae9f728a6abef32905d419bbdb6d3e195c45 /hw/ppc/e500.c | |
parent | 26a0802d1ccbf3c3c659f3d2641cf7deef0e70ac (diff) |
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>
Diffstat (limited to 'hw/ppc/e500.c')
-rw-r--r-- | hw/ppc/e500.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 117c9c08ed..b6eb599751 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -898,6 +898,7 @@ void ppce500_init(MachineState *machine) MemoryRegion *address_space_mem = get_system_memory(); PPCE500MachineState *pms = PPCE500_MACHINE(machine); const PPCE500MachineClass *pmc = PPCE500_MACHINE_GET_CLASS(machine); + MachineClass *mc = MACHINE_CLASS(pmc); PCIBus *pci_bus; CPUPPCState *env = NULL; uint64_t loadaddr; @@ -1073,7 +1074,7 @@ void ppce500_init(MachineState *machine) if (pci_bus) { /* Register network interfaces. */ for (i = 0; i < nb_nics; i++) { - pci_nic_init_nofail(&nd_table[i], pci_bus, "virtio-net-pci", NULL); + pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, NULL); } } |