]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs
authorDavid Woodhouse <dwmw@amazon.co.uk>
Tue, 17 Oct 2023 16:53:58 +0000 (17:53 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 2 Feb 2024 16:23:47 +0000 (16:23 +0000)
commit7d6eff13b3e10efbed9b01fa4eb9515acd86dcf7
tree27c16ccc2c89b458f6e820f447e5a5169febf8ff
parent8d39f9ba14d64a147324778d3e1013eee4643e06
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>
hw/i386/pc.c
hw/i386/pc_piix.c
hw/i386/pc_q35.c
hw/xen/xen-bus.c
hw/xen/xen_devconfig.c
hw/xenpv/xen_machine_pv.c
include/hw/i386/pc.h
include/hw/xen/xen-bus.h
include/hw/xen/xen-legacy-backend.h