qemu-commits
[Top][All Lists]
Advanced

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

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


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

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 85c80b14b8db945eda776ea2cc833211f436b487
      
https://github.com/qemu/qemu/commit/85c80b14b8db945eda776ea2cc833211f436b487
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 2b6b0d10510558f43bbd90318121265b4d8af8b3
      
https://github.com/qemu/qemu/commit/2b6b0d10510558f43bbd90318121265b4d8af8b3
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 18c152e9e0ad1dbd0b24bdb6fa8223f44afa40c0
      
https://github.com/qemu/qemu/commit/18c152e9e0ad1dbd0b24bdb6fa8223f44afa40c0
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: dde2599a9c350223ddfa9cae0c893cbde2c75266
      
https://github.com/qemu/qemu/commit/dde2599a9c350223ddfa9cae0c893cbde2c75266
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: cd8567a72ba80d80a60ddd98c5f5fe16f21a82ef
      
https://github.com/qemu/qemu/commit/cd8567a72ba80d80a60ddd98c5f5fe16f21a82ef
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 20fe04fbc9f267e888c7d6e07708676b171c44bf
      
https://github.com/qemu/qemu/commit/20fe04fbc9f267e888c7d6e07708676b171c44bf
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 002c2c47a5243bb931a7d01715d92437aa2f0857
      
https://github.com/qemu/qemu/commit/002c2c47a5243bb931a7d01715d92437aa2f0857
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 6c5c5263c13f9c959fa6b99b21c89218b6aad496
      
https://github.com/qemu/qemu/commit/6c5c5263c13f9c959fa6b99b21c89218b6aad496
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: d8728c36b46b19127e45e715ef73dd4bd50897d5
      
https://github.com/qemu/qemu/commit/d8728c36b46b19127e45e715ef73dd4bd50897d5
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: b7e36377bf00286867f66a4ac01f58c7e308bf8a
      
https://github.com/qemu/qemu/commit/b7e36377bf00286867f66a4ac01f58c7e308bf8a
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 8014f2bf94a1f852692bacf180decd598ae712fd
      
https://github.com/qemu/qemu/commit/8014f2bf94a1f852692bacf180decd598ae712fd
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: aff3ec45ad496322528f699a5894855333151fe3
      
https://github.com/qemu/qemu/commit/aff3ec45ad496322528f699a5894855333151fe3
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 6065398e186b417ad2e07ba5e367c21e5f7bdf85
      
https://github.com/qemu/qemu/commit/6065398e186b417ad2e07ba5e367c21e5f7bdf85
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 1b0608c3ed4c34e338c6cbc9fb8755d4300f41d9
      
https://github.com/qemu/qemu/commit/1b0608c3ed4c34e338c6cbc9fb8755d4300f41d9
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 40df89266360b1ce8f320c43a69c305fdd4f0332
      
https://github.com/qemu/qemu/commit/40df89266360b1ce8f320c43a69c305fdd4f0332
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 4550b8c1d8fe8e5521130c3632105417fc799d9d
      
https://github.com/qemu/qemu/commit/4550b8c1d8fe8e5521130c3632105417fc799d9d
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: e7943837232d8b029ee72f87114a1c8eda18137d
      
https://github.com/qemu/qemu/commit/e7943837232d8b029ee72f87114a1c8eda18137d
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: ea528f0e8459718a85bb64978b717dcb36dbe139
      
https://github.com/qemu/qemu/commit/ea528f0e8459718a85bb64978b717dcb36dbe139
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: bb4bf749301b11e2ff9d9457bd38df63bbf64007
      
https://github.com/qemu/qemu/commit/bb4bf749301b11e2ff9d9457bd38df63bbf64007
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 3843ba6f9ba12861f564c0daf1584e4b186eb8cb
      
https://github.com/qemu/qemu/commit/3843ba6f9ba12861f564c0daf1584e4b186eb8cb
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 7af8a2d10e1c9b50478a1aa090ee7d759c8b96b9
      
https://github.com/qemu/qemu/commit/7af8a2d10e1c9b50478a1aa090ee7d759c8b96b9
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 75f78393730a1101c55799fe2c4a60bed1de6b25
      
https://github.com/qemu/qemu/commit/75f78393730a1101c55799fe2c4a60bed1de6b25
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: fb3b4c5cba1f65b116a6772c091eab8513b26ffb
      
https://github.com/qemu/qemu/commit/fb3b4c5cba1f65b116a6772c091eab8513b26ffb
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: f60011008fb82ac3bddc97408e6996d76397ce00
      
https://github.com/qemu/qemu/commit/f60011008fb82ac3bddc97408e6996d76397ce00
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 1d9f94f263aaf3016fd2f70f7d061836f9a2ae1c
      
https://github.com/qemu/qemu/commit/1d9f94f263aaf3016fd2f70f7d061836f9a2ae1c
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: fa89d64568b967b92ed2b562ce2c550e3ddb6b15
      
https://github.com/qemu/qemu/commit/fa89d64568b967b92ed2b562ce2c550e3ddb6b15
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 354c32fd50fd35a86d050fa3272d814f47450c1c
      
https://github.com/qemu/qemu/commit/354c32fd50fd35a86d050fa3272d814f47450c1c
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 0ee891bb174a3d0e714354fe46ce20af075f3221
      
https://github.com/qemu/qemu/commit/0ee891bb174a3d0e714354fe46ce20af075f3221
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 8e573ed8654153a1befd40e8bbb886c37374d7b4
      
https://github.com/qemu/qemu/commit/8e573ed8654153a1befd40e8bbb886c37374d7b4
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 342fd7c672bd854a9e2a1be797b2bdb43827f675
      
https://github.com/qemu/qemu/commit/342fd7c672bd854a9e2a1be797b2bdb43827f675
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 317707af079693de4ff447e3333dcc11a902d25e
      
https://github.com/qemu/qemu/commit/317707af079693de4ff447e3333dcc11a902d25e
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: ad656de8585741bdac44962d62a68730883d858f
      
https://github.com/qemu/qemu/commit/ad656de8585741bdac44962d62a68730883d858f
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 7c6a94a7f63b5e3069ad601403b741bcaf68e8be
      
https://github.com/qemu/qemu/commit/7c6a94a7f63b5e3069ad601403b741bcaf68e8be
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: a7a8adca33403589aec5771bca915da167bf205c
      
https://github.com/qemu/qemu/commit/a7a8adca33403589aec5771bca915da167bf205c
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 150664026eafcd13a46e4314ca61413997470358
      
https://github.com/qemu/qemu/commit/150664026eafcd13a46e4314ca61413997470358
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 40d094b0078cddc2400928353110f49f660b5c64
      
https://github.com/qemu/qemu/commit/40d094b0078cddc2400928353110f49f660b5c64
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 99a535d5bb472c2dd888b7bd1189cbeb59205662
      
https://github.com/qemu/qemu/commit/99a535d5bb472c2dd888b7bd1189cbeb59205662
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 87542182581ae69648f4b00c4cb28def1016fbb3
      
https://github.com/qemu/qemu/commit/87542182581ae69648f4b00c4cb28def1016fbb3
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: ba35fad6b318fe71931c041b2b409ea03451650e
      
https://github.com/qemu/qemu/commit/ba35fad6b318fe71931c041b2b409ea03451650e
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: e49dca06fb9c9cc04dfdf7f0d8e0493b46588075
      
https://github.com/qemu/qemu/commit/e49dca06fb9c9cc04dfdf7f0d8e0493b46588075
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 8826372a60c781f0687707a5418dbf57f10e9c46
      
https://github.com/qemu/qemu/commit/8826372a60c781f0687707a5418dbf57f10e9c46
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: b46a06dd806963fdb39c49b08fae97776143c365
      
https://github.com/qemu/qemu/commit/b46a06dd806963fdb39c49b08fae97776143c365
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 91ab41ef21133694aec7f433b6cfb59e56086ed7
      
https://github.com/qemu/qemu/commit/91ab41ef21133694aec7f433b6cfb59e56086ed7
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 640622f8bdda42d87c125ea7181b3b0e98305b85
      
https://github.com/qemu/qemu/commit/640622f8bdda42d87c125ea7181b3b0e98305b85
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: e96ae18177725c39f46cdc697bf815f51aceb9ac
      
https://github.com/qemu/qemu/commit/e96ae18177725c39f46cdc697bf815f51aceb9ac
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: d1336ffc6583308315efacef6b6e53577b537b05
      
https://github.com/qemu/qemu/commit/d1336ffc6583308315efacef6b6e53577b537b05
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 5382a24c9b0be4391ea91b020bb72ad15c05cc88
      
https://github.com/qemu/qemu/commit/5382a24c9b0be4391ea91b020bb72ad15c05cc88
  Author: David Woodhouse <dwmw@amazon.co.uk>
  Date:   2024-02-01 (Thu, 01 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: 17e0f9d6bd89b7994da582f68ebd04661513cc93
      
https://github.com/qemu/qemu/commit/17e0f9d6bd89b7994da582f68ebd04661513cc93
  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.for-upstream-20240201' of 
git://git.infradead.org/users/dwmw2/qemu into staging

Rework matching of network devices to -nic options

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEEMUsIrNDeSBEzpfKGm+mA/QrAFUQFAmW7xY4SHGR3bXdAYW1h
# em9uLmNvLnVrAAoJEJvpgP0KwBVEP5MQAJdyB30UyDJboklJjsdfcbDGto1YUJua
# RlxBD1w46THj3EEtw7eAaGX96J0OSFk+nyxAKG0CxWrFe3GEZRUIGXp+MXqwwdWT
# dHE9CYGJvNnM56YXQ3fu0IqfWQPOQ56jS/LpZiA5BJe8Fvk7d/93voGYMR2ShQw/
# 2DPkD6S2gKdqyaaxW+OR9yP0HCOALdmeLZpCDkwe29X40SQSVI17kFCZtZn1PegL
# gFKJuJB0Ag5FRPYW1v7ytBnbj7KcsYjUiG0hgLjrE3iLVNwTdVldY6Ve9Afm+SKS
# BdoI1SrUEu9kmirgT6NZEJsZc6osdfRtFMHBLRvkMg8KNQ07zmJBg2WtwCqZqSfi
# SXLcrAkybSWH3HR6ONtppOP9rhAOTWk/gd9OVwvceQxXv9J9lTo4cdkaNS8DFW9s
# 2cQrlSMpY/OD6XxhCHQ1AXgBoyfqzZ5+1FUiXvnpgkPDrIZ3evJtAGRSx4NLlsmi
# P8SAu3lXLOuYMYl+p6Zvt3QsG6HGVRd8s4CJ6wEDS6Yp0tk+BVmNlCkRw4KJojZa
# dTD30GcW2yBDLSOkx3Dn+KZkeuKWsT51VWnklTcroVGxzHtScnJ3GJZCpUdfB3QK
# cRnfWcEuG+8sV0pFtuP7eX37b+rLmlf5HAYM3s7aIs0yM2kiHY/m5gNPW8KF84h2
# IQZahjOCaTD7
# =qUcV
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 01 Feb 2024 16:23:42 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.for-upstream-20240201' 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...17e0f9d6bd89



reply via email to

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