net: add qemu_create_nic_bus_devices()
authorDavid Woodhouse <dwmw@amazon.co.uk>
Sun, 22 Oct 2023 08:13:41 +0000 (09:13 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 2 Feb 2024 16:23:47 +0000 (16:23 +0000)
commit93125e4b4f4b96c8fdce7ae73d8d702f37d9f3b2
tree5b9be12e2f5f7362260b0009de65aff992a30718
parent2cdeca04adab3858db11f6740f019b7d29aeac1e
net: add qemu_create_nic_bus_devices()

This will instantiate any NICs which live on a given bus type. Each bus
is allowed *one* substitution (for PCI it's virtio → virtio-net-pci, for
Xen it's xen → xen-net-device; no point in overengineering it unless we
actually want more).

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
include/net/net.h
net/net.c