[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 1/5] hw/arm: Use MachineClass->default_nic in the sbsa-ref mac
From: |
Marcin Juszkiewicz |
Subject: |
[PATCH v2 1/5] hw/arm: Use MachineClass->default_nic in the sbsa-ref machine |
Date: |
Wed, 24 May 2023 12:18:19 +0200 |
From: Thomas Huth <thuth@redhat.com>
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).
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/arm/sbsa-ref.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 792371fdce..9c3e670ec6 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -596,6 +596,7 @@ static void create_pcie(SBSAMachineState *sms)
hwaddr size_mmio_high = sbsa_ref_memmap[SBSA_PCIE_MMIO_HIGH].size;
hwaddr base_pio = sbsa_ref_memmap[SBSA_PCIE_PIO].base;
int irq = sbsa_ref_irqmap[SBSA_PCIE];
+ MachineClass *mc = MACHINE_GET_CLASS(sms);
MemoryRegion *mmio_alias, *mmio_alias_high, *mmio_reg;
MemoryRegion *ecam_alias, *ecam_reg;
DeviceState *dev;
@@ -641,7 +642,7 @@ static void create_pcie(SBSAMachineState *sms)
NICInfo *nd = &nd_table[i];
if (!nd->model) {
- nd->model = g_strdup("e1000e");
+ nd->model = g_strdup(mc->default_nic);
}
pci_nic_init_nofail(nd, pci->bus, nd->model, NULL);
@@ -858,6 +859,7 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
mc->minimum_page_bits = 12;
mc->block_default_type = IF_IDE;
mc->no_cdrom = 1;
+ mc->default_nic = "e1000e";
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "sbsa-ref.ram";
mc->default_cpus = 4;
--
2.40.1
- Re: [PATCH 1/2] docs: sbsa: correct graphics card name, (continued)
- Re: [PATCH 1/2] docs: sbsa: correct graphics card name, Thomas Huth, 2023/05/23
- [PATCH 1/3] hw/arm/sbsa-ref: honor "-vga none" argument, Marcin Juszkiewicz, 2023/05/24
- [PATCH 3/3] hw/arm/sbsa-ref: use MachineClass->default_display, Marcin Juszkiewicz, 2023/05/24
- Re: [PATCH 3/3] hw/arm/sbsa-ref: use MachineClass->default_display, Thomas Huth, 2023/05/24
- Re: [PATCH 3/3] hw/arm/sbsa-ref: use MachineClass->default_display, Thomas Huth, 2023/05/24
- [PATCH 2/3] hw/arm/sbsa-ref: add gfx card only if we have pci, Marcin Juszkiewicz, 2023/05/24
- Re: [PATCH 2/3] hw/arm/sbsa-ref: add gfx card only if we have pci, Thomas Huth, 2023/05/24
- Re: [PATCH 2/3] hw/arm/sbsa-ref: add gfx card only if we have pci, Thomas Huth, 2023/05/24
- Re: [PATCH 1/3] hw/arm/sbsa-ref: honor "-vga none" argument, Thomas Huth, 2023/05/24
- Re: [PATCH 1/3] hw/arm/sbsa-ref: honor "-vga none" argument, Thomas Huth, 2023/05/24
- [PATCH v2 1/5] hw/arm: Use MachineClass->default_nic in the sbsa-ref machine,
Marcin Juszkiewicz <=
- [PATCH v2 4/5] hw/arm/sbsa-ref: add gfx card only if we have pci, Marcin Juszkiewicz, 2023/05/24
- [PATCH v2 3/5] hw/arm/sbsa-ref: honor "-vga none" argument, Marcin Juszkiewicz, 2023/05/24
- [PATCH v2 5/5] hw/arm/sbsa-ref: use MachineClass->default_display, Marcin Juszkiewicz, 2023/05/24
- [PATCH v2 2/5] Add Bochs to list of vga_interfaces, Marcin Juszkiewicz, 2023/05/24