qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 93e9d7: net: add qemu_{configure, create}_nic


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 93e9d7: net: add qemu_{configure, create}_nic_device(), qem...
Date: Fri, 02 Feb 2024 10:56:25 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 93e9d7301e19222d817af7ed15a608029bd7b0b5
      
https://github.com/qemu/qemu/commit/93e9d7301e19222d817af7ed15a608029bd7b0b5
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M include/net/net.h
    M net/net.c

  Log Message:
  -----------
  net: add qemu_{configure,create}_nic_device(), qemu_find_nic_info()

Most code which directly accesses nd_table[] and nb_nics uses them for
one of two things. Either "I have created a NIC device and I'd like a
configuration for it", or "I will create a NIC device *if* there is a
configuration for it".  With some variants on the theme around whether
they actually *check* if the model specified in the configuration is
the right one.

Provide functions which perform both of those, allowing platforms to
be a little more consistent and as a step towards making nd_table[]
and nb_nics private to the net code.

One might argue that platforms ought to be consistent about whether
they create the unconfigured devices or not, but making significant
user-visible changes is explicitly *not* the intent right now.

The new functions leave the 'model' field of the NICInfo as NULL after
using it for the default NIC model, unlike the qemu_check_nic_model()
function which does set nd->model to match default_model explicitly.
This is acceptable because there is no code which consumes nd->model
except this NIC-matching code in net/net.c, and no reasonable excuse
for any code wanting to use nd->model in future.

Also export the qemu_find_nic_info() helper, as some platforms have
special cases they need to handle.

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


  Commit: 2cdeca04adab3858db11f6740f019b7d29aeac1e
      
https://github.com/qemu/qemu/commit/2cdeca04adab3858db11f6740f019b7d29aeac1e
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M net/net.c

  Log Message:
  -----------
  net: report list of available models according to platform

By noting the models for which a configuration was requested, we can give
the user an accurate list of which NIC models were actually available on
the platform/configuration that was otherwise chosen.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>


  Commit: 93125e4b4f4b96c8fdce7ae73d8d702f37d9f3b2
      
https://github.com/qemu/qemu/commit/93125e4b4f4b96c8fdce7ae73d8d702f37d9f3b2
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M include/net/net.h
    M net/net.c

  Log Message:
  -----------
  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>


  Commit: 1785ae69ea262dbcfbd2d59d25ee5e7501701460
      
https://github.com/qemu/qemu/commit/1785ae69ea262dbcfbd2d59d25ee5e7501701460
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/pci/pci.c
    M include/hw/pci/pci.h

  Log Message:
  -----------
  hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot()

The loop over nd_table[] to add PCI NICs is repeated in quite a few
places. Add a helper function to do it.

Some platforms also try to instantiate a specific model in a specific
slot, to match the real hardware. Add pci_init_nic_in_slot() for that
purpose.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>


  Commit: 8d39f9ba14d64a147324778d3e1013eee4643e06
      
https://github.com/qemu/qemu/commit/8d39f9ba14d64a147324778d3e1013eee4643e06
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/i386/pc.c
    M include/hw/net/ne2000-isa.h

  Log Message:
  -----------
  hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

Eliminate direct access to nd_table[] and nb_nics by processing the the
Xen and ISA NICs first and then calling pci_init_nic_devices() for the
rest.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>


  Commit: 7d6eff13b3e10efbed9b01fa4eb9515acd86dcf7
      
https://github.com/qemu/qemu/commit/7d6eff13b3e10efbed9b01fa4eb9515acd86dcf7
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M hw/xen/xen-bus.c
    M hw/xen/xen_devconfig.c
    M hw/xenpv/xen_machine_pv.c
    M include/hw/i386/pc.h
    M include/hw/xen/xen-bus.h
    M include/hw/xen/xen-legacy-backend.h

  Log Message:
  -----------
  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>


  Commit: 861bbc88127b834b1eee241eebe5f2d3fbff07f3
      
https://github.com/qemu/qemu/commit/861bbc88127b834b1eee241eebe5f2d3fbff07f3
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/alpha/dp264.c

  Log Message:
  -----------
  hw/alpha/dp264: use pci_init_nic_devices()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 0e45d0eb238ba5db82ae18defd8a6118613cb1ce
      
https://github.com/qemu/qemu/commit/0e45d0eb238ba5db82ae18defd8a6118613cb1ce
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/sbsa-ref.c

  Log Message:
  -----------
  hw/arm/sbsa-ref: use pci_init_nic_devices()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>


  Commit: e4264b28f6fec623bcb26c6f38c8d06feab818b4
      
https://github.com/qemu/qemu/commit/e4264b28f6fec623bcb26c6f38c8d06feab818b4
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/virt.c

  Log Message:
  -----------
  hw/arm/virt: use pci_init_nic_devices()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 2dfe2f861bbeae425808cf7d89860b56ba54adcc
      
https://github.com/qemu/qemu/commit/2dfe2f861bbeae425808cf7d89860b56ba54adcc
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/hppa/machine.c

  Log Message:
  -----------
  hw/hppa: use pci_init_nic_devices()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 13af77ee509c646fff48e5a21d1558cede334732
      
https://github.com/qemu/qemu/commit/13af77ee509c646fff48e5a21d1558cede334732
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/loongarch/virt.c

  Log Message:
  -----------
  hw/loongarch: use pci_init_nic_devices()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Song Gao <gaosong@loongson.cn>


  Commit: 8e4375618b0870a653e2d7fc4e6f6589bea13bb2
      
https://github.com/qemu/qemu/commit/8e4375618b0870a653e2d7fc4e6f6589bea13bb2
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/mips/fuloong2e.c

  Log Message:
  -----------
  hw/mips/fuloong2e: use pci_init_nic_devices()

The previous behaviour was: *if* the first NIC specified on the command
line was an RTL8139 (or unspecified model) then it gets assigned to PCI
slot 7, which is where the Fuloong board had an RTL8139. All other
devices (including the first, if it was specified as anything other than
an rtl8319) get dynamically assigned on the bus.

The new behaviour is subtly different: If the first NIC was given a
specific model *other* than rtl8139, and a subsequent NIC was not,
then the rtl8139 (or unspecified) NIC will go to slot 7 and the rest
will be dynamically assigned.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 761884013ebdb6a117b3aa98bce6bea1078c5377
      
https://github.com/qemu/qemu/commit/761884013ebdb6a117b3aa98bce6bea1078c5377
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/mips/malta.c

  Log Message:
  -----------
  hw/mips/malta: use pci_init_nic_devices()

The Malta board setup code would previously place the first NIC into PCI
slot 11 if was a PCNet card, and the rest (including the first if it was
anything other than a PCNet card) would be dynamically assigned.

Now it will place any PCNet NIC into slot 11, and then anything else will
be dynamically assigned.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: d2e82b1744ee81b1b1c8d15b2bfd46d46f2a49ba
      
https://github.com/qemu/qemu/commit/d2e82b1744ee81b1b1c8d15b2bfd46d46f2a49ba
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/mips/loongson3_virt.c

  Log Message:
  -----------
  hw/mips/loongson3_virt: use pci_init_nic_devices()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 4c71721651454343ff5cead85f02a1ada7520244
      
https://github.com/qemu/qemu/commit/4c71721651454343ff5cead85f02a1ada7520244
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/ppc/prep.c

  Log Message:
  -----------
  hw/ppc/prep: use pci_init_nic_devices()

Previously, the first PCI NIC would be placed in PCI slot 3 and the rest
would be dynamically assigned. Even if the user overrode the default NIC
type and made it something other than PCNet.

Now, the first PCNet NIC (that is, anything not explicitly specified
to be anything different) will go to slot 3 even if it isn't the first
NIC specified on the command line. And anything else will be dynamically
assigned.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 0aff81618bedcd2f60d83da4f743da4902638be6
      
https://github.com/qemu/qemu/commit/0aff81618bedcd2f60d83da4f743da4902638be6
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/ppc/spapr.c

  Log Message:
  -----------
  hw/ppc/spapr: use qemu_get_nic_info() and pci_init_nic_devices()

Avoid directly referencing nd_table[] by first instantiating any
spapr-vlan devices using a qemu_get_nic_info() loop, then calling
pci_init_nic_devices() to do the rest.

No functional change intended.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 36b6968d3408b779d32eedb0fb11a4b6b828a0b2
      
https://github.com/qemu/qemu/commit/36b6968d3408b779d32eedb0fb11a4b6b828a0b2
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/ppc/e500.c
    M hw/ppc/mac_newworld.c
    M hw/ppc/mac_oldworld.c
    M hw/ppc/ppc440_bamboo.c

  Log Message:
  -----------
  hw/ppc: use pci_init_nic_devices()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 2d89ae0cbf4c04f95843ad9e4b7fe090e5afad46
      
https://github.com/qemu/qemu/commit/2d89ae0cbf4c04f95843ad9e4b7fe090e5afad46
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/sh4/r2d.c

  Log Message:
  -----------
  hw/sh4/r2d: use pci_init_nic_devices()

Previously, the first PCI NIC would be assigned to slot 2 even if the
user override the model and made it something other than an rtl8139
which is the default. Everything else would be dynamically assigned.

Now, the first rtl8139 gets slot 2 and everything else is dynamic.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp>


  Commit: c8a6107bca7f4590cf213407afa9a021e20a3a59
      
https://github.com/qemu/qemu/commit/c8a6107bca7f4590cf213407afa9a021e20a3a59
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/sparc64/sun4u.c

  Log Message:
  -----------
  hw/sparc64/sun4u: use pci_init_nic_devices()

The first sunhme NIC gets placed a function 1 on slot 1 of PCI bus A,
and the rest are dynamically assigned on PCI bus B.

Previously, any PCI NIC would get the special treatment purely by
virtue of being first in the list.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 18639296946c01b992ecfea1605a36963283acb1
      
https://github.com/qemu/qemu/commit/18639296946c01b992ecfea1605a36963283acb1
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/xtensa/virt.c

  Log Message:
  -----------
  hw/xtensa/virt: use pci_init_nic_devices()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 7e9c15ace60e4e443bc196b7e7bcd8e405653083
      
https://github.com/qemu/qemu/commit/7e9c15ace60e4e443bc196b7e7bcd8e405653083
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/allwinner-a10.c
    M hw/arm/allwinner-h3.c
    M hw/arm/allwinner-r40.c

  Log Message:
  -----------
  hw/arm/allwinner: use qemu_configure_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: b3cfec5bc925c8c06aa6631f7f0e7391946de372
      
https://github.com/qemu/qemu/commit/b3cfec5bc925c8c06aa6631f7f0e7391946de372
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/aspeed.c

  Log Message:
  -----------
  hw/arm/aspeed: use qemu_configure_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>


  Commit: 809601b3aa8d0ee5db13cff97833aae4acd0d782
      
https://github.com/qemu/qemu/commit/809601b3aa8d0ee5db13cff97833aae4acd0d782
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/exynos4_boards.c

  Log Message:
  -----------
  hw/arm/exynos4: use qemu_create_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 8cef839c2d2f3fc2430570fd040104e3ed61dcf8
      
https://github.com/qemu/qemu/commit/8cef839c2d2f3fc2430570fd040104e3ed61dcf8
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/fsl-imx25.c
    M hw/arm/fsl-imx6.c
    M hw/arm/fsl-imx6ul.c
    M hw/arm/fsl-imx7.c

  Log Message:
  -----------
  hw/arm/fsl: use qemu_configure_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: cd53991de40a90399a8b56f0ad7b9320442ea5bb
      
https://github.com/qemu/qemu/commit/cd53991de40a90399a8b56f0ad7b9320442ea5bb
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/gumstix.c
    M hw/arm/integratorcp.c
    M hw/arm/mainstone.c
    M hw/arm/realview.c
    M hw/arm/versatilepb.c
    M hw/net/smc91c111.c
    M include/hw/net/smc91c111.h

  Log Message:
  -----------
  hw/net/smc91c111: use qemu_configure_nic_device()

Some callers instantiate the device unconditionally, others will do so only
if there is a NICInfo to go with it. This appears to be fairly random, but
preserve the existing behaviour of each caller for now.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: f138ed5e005db9d8ce1eb511bea7c9da4333da76
      
https://github.com/qemu/qemu/commit/f138ed5e005db9d8ce1eb511bea7c9da4333da76
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/kzm.c
    M hw/arm/mps2.c
    M hw/arm/realview.c
    M hw/arm/vexpress.c
    M hw/net/lan9118.c
    M include/hw/net/lan9118.h

  Log Message:
  -----------
  hw/net/lan9118: use qemu_configure_nic_device()

Some callers instantiate the device unconditionally, others will do so only
if there is a NICInfo to go with it. This appears to be fairly random, but
preseve the existing behaviour for now.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 27c0235f72141e05bb4a815526bcdb777fa9f5bb
      
https://github.com/qemu/qemu/commit/27c0235f72141e05bb4a815526bcdb777fa9f5bb
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/highbank.c

  Log Message:
  -----------
  hw/arm/highbank: use qemu_create_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 707a42e2db20e61c6bfb575e9b6c2b2fdd24a247
      
https://github.com/qemu/qemu/commit/707a42e2db20e61c6bfb575e9b6c2b2fdd24a247
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/npcm7xx.c
    M tests/qtest/npcm7xx_emc-test.c

  Log Message:
  -----------
  hw/arm/npcm7xx: use qemu_configure_nic_device, allow emc0/emc1 as aliases

Also update the test to specify which device to attach the test socket
to, and remove the comment lamenting the fact that we can't do so.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 13280845886c94fff7278e1d1fe0fa12e03700ad
      
https://github.com/qemu/qemu/commit/13280845886c94fff7278e1d1fe0fa12e03700ad
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/stellaris.c

  Log Message:
  -----------
  hw/arm/stellaris: use qemu_find_nic_info()

Rather than just using qemu_configure_nic_device(), populate the MAC
address in the system-registers device by peeking at the NICInfo before
it's assigned to the device.

Generate the MAC address early, if there is no matching -nic option.
Otherwise the MAC address wouldn't be generated until net_client_init1()
runs.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: e8c003c41411f89f797aafc255b6d09f078726cb
      
https://github.com/qemu/qemu/commit/e8c003c41411f89f797aafc255b6d09f078726cb
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/arm/mps2-tz.c
    M hw/arm/msf2-soc.c
    M hw/arm/musicpal.c
    M hw/arm/xilinx_zynq.c
    M hw/arm/xlnx-versal.c
    M hw/arm/xlnx-zynqmp.c

  Log Message:
  -----------
  hw/arm: use qemu_configure_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: f52f3b342e3887c44b4f6c48a0361f3a6b63910f
      
https://github.com/qemu/qemu/commit/f52f3b342e3887c44b4f6c48a0361f3a6b63910f
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/cris/axis_dev88.c
    M hw/net/etraxfs_eth.c
    M include/hw/cris/etraxfs.h

  Log Message:
  -----------
  hw/net/etraxfs-eth: use qemu_configure_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 6e32426f68e8d7c05a9f5b5546cb336f415cae89
      
https://github.com/qemu/qemu/commit/6e32426f68e8d7c05a9f5b5546cb336f415cae89
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/m68k/mcf5208.c

  Log Message:
  -----------
  hw/m68k/mcf5208: use qemu_create_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 3fb8ae838b649cb629af88bada030a84c95c2722
      
https://github.com/qemu/qemu/commit/3fb8ae838b649cb629af88bada030a84c95c2722
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/m68k/q800.c

  Log Message:
  -----------
  hw/m68k/q800: use qemu_find_nic_info()

If a corresponding NIC configuration was found, it will have a MAC address
already assigned, so use that. Else, generate and assign a default one.

Using qemu_find_nic_info() is simpler than the alternative of using
qemu_configure_nic_device() and then having to fetch the "mac" property
as a string and convert it.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 3090d7d9d6263092caf26e940e9b49e16a3727ed
      
https://github.com/qemu/qemu/commit/3090d7d9d6263092caf26e940e9b49e16a3727ed
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/microblaze/petalogix_ml605_mmu.c
    M hw/microblaze/petalogix_s3adsp1800_mmu.c

  Log Message:
  -----------
  hw/microblaze: use qemu_configure_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: b07734f97121e4db1564fa3b39c36946cbdb0de4
      
https://github.com/qemu/qemu/commit/b07734f97121e4db1564fa3b39c36946cbdb0de4
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/mips/mipssim.c

  Log Message:
  -----------
  hw/mips/mipssim: use qemu_create_nic_device()

The MIPS SIM platform instantiates its NIC only if a corresponding
configuration exists for it. Use qemu_create_nic_device() function for
that.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: e104edbb9d0fd53e3a432cbb3b6b5fb2cb81a962
      
https://github.com/qemu/qemu/commit/e104edbb9d0fd53e3a432cbb3b6b5fb2cb81a962
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/mips/jazz.c

  Log Message:
  -----------
  hw/mips/jazz: use qemu_find_nic_info()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 960036440942f32644f6070d9a0fffcef7196aca
      
https://github.com/qemu/qemu/commit/960036440942f32644f6070d9a0fffcef7196aca
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/net/lasi_i82596.c
    M hw/net/meson.build

  Log Message:
  -----------
  hw/net/lasi_i82596: Re-enable build

When converting to the shiny build-system-du-jour, a typo prevented the
last_i82596 driver from being built. Correct the config option name to
re-enable the build. And include "sysemu/sysemu.h" so it actually builds.

Fixes: b1419fa66558 ("meson: convert hw/net")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2144
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 2a98878ff40131ae5d12d92e8bce05caef6a4c8d
      
https://github.com/qemu/qemu/commit/2a98878ff40131ae5d12d92e8bce05caef6a4c8d
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/hppa/machine.c
    M hw/net/lasi_i82596.c
    M include/hw/net/lasi_82596.h

  Log Message:
  -----------
  hw/net/lasi_i82596: use qemu_create_nic_device()

Create the device only if there is a corresponding NIC config for it.
Remove the explicit check on nd_table[0].used from hw/hppa/machine.c
which (since commit d8a3220005d7) tries to do the same thing.

The lasi_82596 support has been disabled since it was first introduced,
since enable_lasi_lan() has always been zero. This allows the user to
enable it by explicitly requesting a NIC model 'lasi_82596' or just
using the alias 'lasi'. Otherwise, it defaults to a PCI NIC as before.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 5fcc51548dc7b6c0c42e777c3586804eb48d8586
      
https://github.com/qemu/qemu/commit/5fcc51548dc7b6c0c42e777c3586804eb48d8586
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/openrisc/openrisc_sim.c

  Log Message:
  -----------
  hw/openrisc/openrisc_sim: use qemu_create_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 0a7549db0378ac828b80b991e9d99f6738575859
      
https://github.com/qemu/qemu/commit/0a7549db0378ac828b80b991e9d99f6738575859
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/riscv/microchip_pfsoc.c
    M hw/riscv/sifive_u.c

  Log Message:
  -----------
  hw/riscv: use qemu_configure_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 646f87a87408c04f42e1931637eb43bada4f36b5
      
https://github.com/qemu/qemu/commit/646f87a87408c04f42e1931637eb43bada4f36b5
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/s390x/s390-virtio-ccw.c

  Log Message:
  -----------
  hw/s390x/s390-virtio-ccw: use qemu_create_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Thomas Huth <thuth@redhat.com>


  Commit: ae0b175b234370499970d7471397010727e448d9
      
https://github.com/qemu/qemu/commit/ae0b175b234370499970d7471397010727e448d9
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/sparc/sun4m.c

  Log Message:
  -----------
  hw/sparc/sun4m: use qemu_find_nic_info()

Obtain the MAC address from the NIC configuration if there is one, or
generate one explicitly so that it can be placed in the PROM.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 7db00af63664a0a88ef0cf1c1c9d8c590d9fc796
      
https://github.com/qemu/qemu/commit/7db00af63664a0a88ef0cf1c1c9d8c590d9fc796
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/xtensa/xtfpga.c

  Log Message:
  -----------
  hw/xtensa/xtfpga: use qemu_create_nic_device()

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 09c292c9e4db45152e3d5fed28c7b8c60bcb3cd9
      
https://github.com/qemu/qemu/commit/09c292c9e4db45152e3d5fed28c7b8c60bcb3cd9
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M include/net/net.h
    M net/net.c

  Log Message:
  -----------
  net: remove qemu_check_nic_model()

There are no callers of this function any more, as they have all been
converted to qemu_{create,configure}_nic_device().

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 75942eea59cbba748f87be86a7e3d38144330837
      
https://github.com/qemu/qemu/commit/75942eea59cbba748f87be86a7e3d38144330837
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/pci/pci.c
    M include/hw/pci/pci.h

  Log Message:
  -----------
  hw/pci: remove pci_nic_init_nofail()

This function is no longer used, as all its callers have been converted
to use pci_init_nic_devices() instead.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 481434f99e5293cadf0f056bef4afbbefd7b0bb3
      
https://github.com/qemu/qemu/commit/481434f99e5293cadf0f056bef4afbbefd7b0bb3
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M include/net/net.h
    M net/net.c

  Log Message:
  -----------
  net: remove qemu_show_nic_models(), qemu_find_nic_model()

These old functions can be removed now too. Let net_param_nic() print
the full set of network devices directly, and also make it note that a
list more specific to this platform/config will be available by using
'-nic model=help' instead.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: e8c5c4525cbbd7207c085732cfd1e67d8f3d662a
      
https://github.com/qemu/qemu/commit/e8c5c4525cbbd7207c085732cfd1e67d8f3d662a
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M include/net/net.h
    M net/net.c
    M system/globals.c

  Log Message:
  -----------
  net: make nb_nics and nd_table[] static in net/net.c

Also remove the stale declaration of host_net_devices; the actual
definition was removed long ago in commit 7cc28cb06104 ("net: Remove
the deprecated 'host_net_add' and 'host_net_remove' HMP commands")

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>


  Commit: 29b008927ef6e3fbb70e6607b25d3fcae26a5190
      
https://github.com/qemu/qemu/commit/29b008927ef6e3fbb70e6607b25d3fcae26a5190
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M hw/alpha/dp264.c
    M hw/arm/allwinner-a10.c
    M hw/arm/allwinner-h3.c
    M hw/arm/allwinner-r40.c
    M hw/arm/aspeed.c
    M hw/arm/exynos4_boards.c
    M hw/arm/fsl-imx25.c
    M hw/arm/fsl-imx6.c
    M hw/arm/fsl-imx6ul.c
    M hw/arm/fsl-imx7.c
    M hw/arm/gumstix.c
    M hw/arm/highbank.c
    M hw/arm/integratorcp.c
    M hw/arm/kzm.c
    M hw/arm/mainstone.c
    M hw/arm/mps2-tz.c
    M hw/arm/mps2.c
    M hw/arm/msf2-soc.c
    M hw/arm/musicpal.c
    M hw/arm/npcm7xx.c
    M hw/arm/realview.c
    M hw/arm/sbsa-ref.c
    M hw/arm/stellaris.c
    M hw/arm/versatilepb.c
    M hw/arm/vexpress.c
    M hw/arm/virt.c
    M hw/arm/xilinx_zynq.c
    M hw/arm/xlnx-versal.c
    M hw/arm/xlnx-zynqmp.c
    M hw/cris/axis_dev88.c
    M hw/hppa/machine.c
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M hw/loongarch/virt.c
    M hw/m68k/mcf5208.c
    M hw/m68k/q800.c
    M hw/microblaze/petalogix_ml605_mmu.c
    M hw/microblaze/petalogix_s3adsp1800_mmu.c
    M hw/mips/fuloong2e.c
    M hw/mips/jazz.c
    M hw/mips/loongson3_virt.c
    M hw/mips/malta.c
    M hw/mips/mipssim.c
    M hw/net/etraxfs_eth.c
    M hw/net/lan9118.c
    M hw/net/lasi_i82596.c
    M hw/net/meson.build
    M hw/net/smc91c111.c
    M hw/openrisc/openrisc_sim.c
    M hw/pci/pci.c
    M hw/ppc/e500.c
    M hw/ppc/mac_newworld.c
    M hw/ppc/mac_oldworld.c
    M hw/ppc/ppc440_bamboo.c
    M hw/ppc/prep.c
    M hw/ppc/spapr.c
    M hw/riscv/microchip_pfsoc.c
    M hw/riscv/sifive_u.c
    M hw/s390x/s390-virtio-ccw.c
    M hw/sh4/r2d.c
    M hw/sparc/sun4m.c
    M hw/sparc64/sun4u.c
    M hw/xen/xen-bus.c
    M hw/xen/xen_devconfig.c
    M hw/xenpv/xen_machine_pv.c
    M hw/xtensa/virt.c
    M hw/xtensa/xtfpga.c
    M include/hw/cris/etraxfs.h
    M include/hw/i386/pc.h
    M include/hw/net/lan9118.h
    M include/hw/net/lasi_82596.h
    M include/hw/net/ne2000-isa.h
    M include/hw/net/smc91c111.h
    M include/hw/pci/pci.h
    M include/hw/xen/xen-bus.h
    M include/hw/xen/xen-legacy-backend.h
    M include/net/net.h
    M net/net.c
    M system/globals.c
    M tests/qtest/npcm7xx_emc-test.c

  Log Message:
  -----------
  Merge tag 'pull-nic-config-2-20240202' of 
git://git.infradead.org/users/dwmw2/qemu into staging

Rework matching of network devices to -nic options (v2)

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEEMUsIrNDeSBEzpfKGm+mA/QrAFUQFAmW9F9oSHGR3bXdAYW1h
# em9uLmNvLnVrAAoJEJvpgP0KwBVEVwsQAIIDTYb3R/vxpf6w9n+n6FWCbFt/ihPC
# RbQ/Zrnoj6K3dCj6U3zJDpa5qpJ27/AiFfVv/gU13d+ELf72uHKE50GkQa2r/Fl8
# cPoW1LRinGFGxQS+WY5OnRYJ2mBaVx6THUd5DCgb5wpkBgVe21XsZLr6pfAapNCG
# c22HBaIb8sHPeIV2wf1xZKEswNGlkXuylBnS4wayncRKa2vOYPAAO7P4PvwNuMnb
# j0pLyLfD6Zx+6D53ema4zpcDh7d1Qn5eDGHQmy55Ml5AleC05gsDzrCEeiT4vU9T
# 9fj6w8NlyLkPYLqTodAEeaUpUCFhMO312VPSM163iYOUDtjqz10bBZncgbRrsR5I
# 30bKqQvEQ8PAQZWILNhfyHrYw4/O2Y88sUf/lE8lGmHvVYda+yqq5lgEyPFHbJwh
# ZCEJQalc6tRATIWUqI/Lw+X7hqnJ29c14hkEVG8L0KW0fIB/cqXUStzcUt87VkA2
# wwQI4aAGWZE1pvFvhmeM2rTDXfg1uD8SoFDTj4ORJl/7PEemf1yraKUYb8YdRE0z
# dQWfLmSnl1JkTa0yVF5MtnoTJUP8PX+hhJROfdwvfd1sU5s98O5pivYf7arUybVl
# j4g4qwm8IUBiAznZzbhdp38Q91RFvBKjjLsx/+Ts9avZTL0xCUcCvt21wzqWhbkc
# X7KdrU/XxVry
# =4PuR
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 02 Feb 2024 16:27:06 GMT
# gpg:                using RSA key 314B08ACD0DE481133A5F2869BE980FD0AC01544
# gpg:                issuer "dwmw@amazon.co.uk"
# gpg: Good signature from "David Woodhouse <dwmw@amazon.co.uk>" [unknown]
# gpg:                 aka "David Woodhouse <dwmw@amazon.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 314B 08AC D0DE 4811 33A5  F286 9BE9 80FD 0AC0 1544

* tag 'pull-nic-config-2-20240202' of git://git.infradead.org/users/dwmw2/qemu: 
(47 commits)
  net: make nb_nics and nd_table[] static in net/net.c
  net: remove qemu_show_nic_models(), qemu_find_nic_model()
  hw/pci: remove pci_nic_init_nofail()
  net: remove qemu_check_nic_model()
  hw/xtensa/xtfpga: use qemu_create_nic_device()
  hw/sparc/sun4m: use qemu_find_nic_info()
  hw/s390x/s390-virtio-ccw: use qemu_create_nic_device()
  hw/riscv: use qemu_configure_nic_device()
  hw/openrisc/openrisc_sim: use qemu_create_nic_device()
  hw/net/lasi_i82596: use qemu_create_nic_device()
  hw/net/lasi_i82596: Re-enable build
  hw/mips/jazz: use qemu_find_nic_info()
  hw/mips/mipssim: use qemu_create_nic_device()
  hw/microblaze: use qemu_configure_nic_device()
  hw/m68k/q800: use qemu_find_nic_info()
  hw/m68k/mcf5208: use qemu_create_nic_device()
  hw/net/etraxfs-eth: use qemu_configure_nic_device()
  hw/arm: use qemu_configure_nic_device()
  hw/arm/stellaris: use qemu_find_nic_info()
  hw/arm/npcm7xx: use qemu_configure_nic_device, allow emc0/emc1 as aliases
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/c3709fde5955...29b008927ef6



reply via email to

[Prev in Thread] Current Thread [Next in Thread]