aboutsummaryrefslogtreecommitdiff
path: root/hw/xenpv/xen_machine_pv.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2023-10-17 17:53:58 +0100
committerDavid Woodhouse <dwmw@amazon.co.uk>2024-02-02 16:23:47 +0000
commit7d6eff13b3e10efbed9b01fa4eb9515acd86dcf7 (patch)
tree27c16ccc2c89b458f6e820f447e5a5169febf8ff /hw/xenpv/xen_machine_pv.c
parent8d39f9ba14d64a147324778d3e1013eee4643e06 (diff)
hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs
When instantiating XenBus itself, for each NIC which is configured with either the model unspecified, or set to to "xen" or "xen-net-device", create a corresponding xen-net-device for it. Now we can revert the previous more hackish version which relied on the platform code explicitly registering the NICs on its own XenBus, having returned the BusState* from xen_bus_init() itself. This also fixes the setup for Xen PV guests, which was previously broken in various ways and never actually managed to peer with the netdev. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'hw/xenpv/xen_machine_pv.c')
-rw-r--r--hw/xenpv/xen_machine_pv.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
index 9f9f137f99..1130d1a147 100644
--- a/hw/xenpv/xen_machine_pv.c
+++ b/hw/xenpv/xen_machine_pv.c
@@ -32,8 +32,6 @@
static void xen_init_pv(MachineState *machine)
{
- int i;
-
setup_xen_backend_ops();
/* Initialize backend core & drivers */
@@ -62,13 +60,6 @@ static void xen_init_pv(MachineState *machine)
vga_interface_created = true;
}
- /* configure nics */
- for (i = 0; i < nb_nics; i++) {
- if (!nd_table[i].model || 0 != strcmp(nd_table[i].model, "xen"))
- continue;
- xen_config_dev_nic(nd_table + i);
- }
-
xen_bus_init();
/* config cleanup hook */