Re: More than 255 vcpus Windows VM setup without viommu ?

2024-07-02 Thread David Woodhouse
On Tue, 2024-07-02 at 05:17 +, Sandesh Patel wrote: > Hi All, > Is it possible to setup a large Windows VM (say 512 vcpus) without > adding viommu (EIM=on, IR=on)? > When I try to power such VM, the qemu process crashes with error- > ``` > qemu-kvm: ../accel/kvm/kvm-all.c:1837:

[RFC PATCH] hw/acpi: Add vmclock device

2024-06-28 Thread David Woodhouse
From: David Woodhouse The vmclock device addresses the problem of live migration with precision clocks. The tolerances of a hardware counter (e.g. TSC) are typically around ±50PPM. We use NTP/PTP/PPS to discipline that counter against an external source of 'real' time, and track the precise

[PATCH v2] hw/i386/fw_cfg: Add etc/e820 to fw_cfg late

2024-06-19 Thread David Woodhouse
check for error anyway. Signed-off-by: David Woodhouse --- v2: Make the table static and introduce e820_get_table(), use assert() hw/i386/e820_memory_layout.c | 16 +++- hw/i386/e820_memory_layout.h | 8 ++-- hw/i386/fw_cfg.c | 18 +- hw/i386/fw_cfg.h

Re: [PATCH] hw/i386/fw_cfg: Add etc/e820 to fw_cfg late

2024-06-17 Thread David Woodhouse
On Mon, 2024-06-17 at 15:15 +0100, Peter Maydell wrote: > On Mon, 17 Jun 2024 at 14:46, David Woodhouse wrote: > > > > From: David Woodhouse > > > > In e820_add_entry() the e820_table is reallocated with g_renew() to make > > space for a new entry. Howeve

[PATCH] hw/i386/fw_cfg: Add etc/e820 to fw_cfg late

2024-06-17 Thread David Woodhouse
From: David Woodhouse In e820_add_entry() the e820_table is reallocated with g_renew() to make space for a new entry. However, fw_cfg_arch_create() just uses the existing e820_table pointer. This leads to a use-after-free if anything adds a new entry after fw_cfg is set up. Shift the addition

Re: [RFC PATCH-for-9.0 v2 09/19] hw/block/xen_blkif: Align structs with QEMU_ALIGNED() instead of #pragma

2024-03-27 Thread David Woodhouse
On 27 March 2024 13:31:52 GMT, Anthony PERARD wrote: >On Tue, Nov 14, 2023 at 03:38:05PM +0100, Philippe Mathieu-Daudé wrote: >> Except imported source files, QEMU code base uses >> the QEMU_ALIGNED() macro to align its structures. > >This patch only convert the alignment, but discard pack. We

Re: Unmapping KVM Guest Memory from Host Kernel

2024-03-08 Thread David Woodhouse
On Fri, 2024-03-08 at 09:35 -0800, David Matlack wrote: > I think what James is looking for (and what we are also interested > in), is _eliminating_ the ability to access guest memory from the > direct map entirely. And in general, eliminate the ability to access > guest memory in as many ways as

Re: [PATCH 2/2] tests/qtest/npcm7xx_emc-test: Connect all NICs to a backend

2024-02-06 Thread David Woodhouse
by manually connecting every NIC > on the board to some backend. > > Signed-off-by: Peter Maydell Reviewed-by: David Woodhouse ... although do we want to expand this test to cover the GMACs? smime.p7s Description: S/MIME cryptographic signature

Re: [PATCH 1/2] hw/arm/npcm7xx: Call qemu_configure_nic_device() for GMAC modules

2024-02-06 Thread David Woodhouse
unity to use the -nic commandline > option to create a network backend and connect it to the GMACs. > > Add the missing call. > > Fixes: 21e5326a7c ("hw/arm: Add GMAC devices to NPCM7XX SoC") > Signed-off-by: Peter Maydell Reviewed-by: David Woodhouse smime.p7s Description: S/MIME cryptographic signature

Re: [PULL 00/47] nic-config.for-upstream queue

2024-02-02 Thread David Woodhouse
On Fri, 2024-02-02 at 16:15 +, Peter Maydell wrote: > On Fri, 2 Feb 2024 at 16:01, David Woodhouse wrote: > > > > What is the next step? Post the full series as a v5, or perhaps just > > the single fixed patch which is now at > > https://git.infradead.org/?p=users/

[PULL v2 38/47] hw/net/lasi_i82596: use qemu_create_nic_device()

2024-02-02 Thread David Woodhouse
From: David Woodhouse 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

[PULL v2 00/47] nic-config-2 queue

2024-02-02 Thread David Woodhouse
From: David Woodhouse The following changes since commit c3709fde5955d13f6d4f86ab46ef3cc2288ca65e: Merge tag 'pull-aspeed-20240201' of https://github.com/legoater/qemu into staging (2024-02-01 14:42:11 +) are available in the Git repository at: git://git.infradead.org/users/dwmw2

[PATCH v4.1 38/47] hw/net/lasi_i82596: use qemu_create_nic_device()

2024-02-02 Thread David Woodhouse
From: David Woodhouse 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

Re: [PULL 00/47] nic-config.for-upstream queue

2024-02-02 Thread David Woodhouse
On Fri, 2024-02-02 at 15:32 +, Peter Maydell wrote: > > $ ./build/all/qemu-system-hppa -M C3700 > Segmentation fault (core dumped) Ah, got it. Some HPPA machine types don't have a lasi_dev. --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -362,9 +362,11 @@ static void

Re: [PULL 00/47] nic-config.for-upstream queue

2024-02-02 Thread David Woodhouse
On Fri, 2024-02-02 at 15:32 +, Peter Maydell wrote: > > This fails "make check' because some of the qom-test and > test-hmp checks fail when the QEMU binary segfaults. > > https://gitlab.com/qemu-project/qemu/-/jobs/6084552256 > https://gitlab.com/qemu-project/qemu/-/jobs/6084044180 Thanks.

[PULL 07/47] hw/alpha/dp264: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/alpha/dp264.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index 03495e1e60..52a1fa310b 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c

[PULL 15/47] hw/ppc/prep: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 01/47] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 05/47] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Paul Durrant --- hw/i386/pc.c| 31

[PULL 32/47] hw/m68k/mcf5208: use qemu_create_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/m68k/mcf5208.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c index d22d8536db..0cfb806c20 100644 --- a/hw/m68k/mcf5208.c +++ b

[PULL 08/47] hw/arm/sbsa-ref: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Leif Lindholm --- hw/arm/sbsa-ref.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 85cb68d546..f2adf30337 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa

[PULL 37/47] hw/net/lasi_i82596: Re-enable build

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 00/47] nic-config.for-upstream queue

2024-02-01 Thread David Woodhouse
David Woodhouse (47): net: add qemu_{configure,create}_nic_device(), qemu_find_nic_info() net: report list of available models according to platform net: add qemu_create_nic_bus_devices() hw/pci: add

[PULL 17/47] hw/ppc: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/ppc/e500.c | 4 +--- hw/ppc/mac_newworld.c | 4 +--- hw/ppc/mac_oldworld.c | 4 +--- hw/ppc/ppc440_bamboo.c | 14 +- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git

[PULL 24/47] hw/arm/fsl: use qemu_configure_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/arm/fsl-imx25.c | 2 +- hw/arm/fsl-imx6.c | 2 +- hw/arm/fsl-imx6ul.c | 2 +- hw/arm/fsl-imx7.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl

[PULL 41/47] hw/s390x/s390-virtio-ccw: use qemu_create_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Acked-by: Thomas Huth --- hw/s390x/s390-virtio-ccw.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index c99682b07d..62804cc228 100644 --- a/hw/s390x

[PULL 33/47] hw/m68k/q800: use qemu_find_nic_info()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 43/47] hw/xtensa/xtfpga: use qemu_create_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/xtensa/xtfpga.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index fbad1c83a3..f49e6591dc 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw

[PULL 25/47] hw/net/smc91c111: use qemu_configure_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- hw

[PULL 38/47] hw/net/lasi_i82596: use qemu_create_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 04/47] hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 34/47] hw/microblaze: use qemu_configure_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/microblaze/petalogix_ml605_mmu.c | 3 +-- hw/microblaze/petalogix_s3adsp1800_mmu.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw

[PULL 36/47] hw/mips/jazz: use qemu_find_nic_info()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/mips/jazz.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 0d2348aa5a..5bf3e328db 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c

[PULL 02/47] net: report list of available models according to platform

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Paul Durrant --- net

[PULL 42/47] hw/sparc/sun4m: use qemu_find_nic_info()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- hw/sparc/sun4m.c | 20 ++-- 1 file changed, 14 insertions

[PULL 46/47] net: remove qemu_show_nic_models(), qemu_find_nic_model()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 22/47] hw/arm/aspeed: use qemu_configure_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Acked-by: Cédric Le Goater Reviewed-by: Cédric Le Goater --- hw/arm/aspeed.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index cc59176563..bed5e4f40b 100644 --- a/hw/arm

[PULL 20/47] hw/xtensa/virt: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/xtensa/virt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c index a6cf646e99..5310a88861 100644 --- a/hw/xtensa/virt.c +++ b/hw/xtensa/virt.c

[PULL 28/47] hw/arm/npcm7xx: use qemu_configure_nic_device, allow emc0/emc1 as aliases

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- hw/arm/npcm7xx.c | 16 +--- tests/qtest

[PULL 31/47] hw/net/etraxfs-eth: use qemu_configure_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/cris/axis_dev88.c | 9 - hw/net/etraxfs_eth.c | 5 ++--- include/hw/cris/etraxfs.h | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/cris/axis_dev88.c b/hw/cris

[PULL 16/47] hw/ppc/spapr: use qemu_get_nic_info() and pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- hw/ppc

[PULL 11/47] hw/loongarch: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Song Gao --- hw/loongarch/virt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index c9a680e61a..0ad7d8c887 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch

[PULL 35/47] hw/mips/mipssim: use qemu_create_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- hw/mips/mipssim.c | 13 +++-- 1 file changed, 7 insertions

[PULL 13/47] hw/mips/malta: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 12/47] hw/mips/fuloong2e: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 27/47] hw/arm/highbank: use qemu_create_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/arm/highbank.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index e6e27d69af..e12374766e 100644 --- a/hw/arm/highbank.c +++ b/hw/arm

[PULL 03/47] net: add qemu_create_nic_bus_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 09/47] hw/arm/virt: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/arm/virt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index e6ead2c5c8..368c2a415a 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1457,9 +1457,7

[PULL 10/47] hw/hppa: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/hppa/machine.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 9e611620cc..a1045b48cc 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa

[PULL 21/47] hw/arm/allwinner: use qemu_configure_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/arm/allwinner-a10.c | 6 +- hw/arm/allwinner-h3.c | 6 +- hw/arm/allwinner-r40.c | 27 ++- 3 files changed, 4 insertions(+), 35 deletions(-) diff --git a/hw/arm/allwinner

[PULL 14/47] hw/mips/loongson3_virt: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/mips/loongson3_virt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index 33eae01eca..caedde2df0 100644 --- a/hw/mips

[PULL 44/47] net: remove qemu_check_nic_model()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- include/net/net.h | 1 - net/net.c | 13 - 2 files changed, 14

[PULL 30/47] hw/arm: use qemu_configure_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/arm/mps2-tz.c | 8 ++-- hw/arm/msf2-soc.c| 6 +- hw/arm/musicpal.c| 3 +-- hw/arm/xilinx_zynq.c | 11 --- hw/arm/xlnx-versal.c | 7 +-- hw/arm/xlnx-zynqmp.c | 8

[PULL 19/47] hw/sparc64/sun4u: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed

[PULL 29/47] hw/arm/stellaris: use qemu_find_nic_info()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 40/47] hw/riscv: use qemu_configure_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/riscv/microchip_pfsoc.c | 14 ++ hw/riscv/sifive_u.c| 7 +-- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/hw/riscv/microchip_pfsoc.c b/hw/riscv/microchip_pfsoc.c

[PULL 45/47] hw/pci: remove pci_nic_init_nofail()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- hw/pci/pci.c | 72 include/hw/pci/pci.h | 3

[PULL 18/47] hw/sh4/r2d: use pci_init_nic_devices()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 47/47] net: make nb_nics and nd_table[] static in net/net.c

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --

[PULL 26/47] hw/net/lan9118: use qemu_configure_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- hw/arm/kzm.c

[PULL 39/47] hw/openrisc/openrisc_sim: use qemu_create_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/openrisc/openrisc_sim.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index 35da123aef..bffd6f721f 100644

[PULL 06/47] hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs

2024-02-01 Thread David Woodhouse
From: David Woodhouse 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

[PULL 23/47] hw/arm/exynos4: use qemu_create_nic_device()

2024-02-01 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/arm/exynos4_boards.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c index b0e13eb4f0..003992189b 100644 --- a/hw/arm

Re: [PATCH v4 33/47] hw/m68k/q800: use qemu_find_nic_info()

2024-02-01 Thread David Woodhouse
On Thu, 2024-02-01 at 11:30 +0100, Thomas Huth wrote: > On 31/01/2024 15.18, David Woodhouse wrote: > > On Wed, 2024-01-31 at 13:18 +0100, Thomas Huth wrote: > > > Don't we have to change nd->macaddr.a[0 to 2] with this hard-coded > > > MAC-prefix, too? > >

Re: [PATCH v4 33/47] hw/m68k/q800: use qemu_find_nic_info()

2024-01-31 Thread David Woodhouse
On Wed, 2024-01-31 at 13:18 +0100, Thomas Huth wrote: > > > @@ -386,14 +382,21 @@ static void q800_machine_init(MachineState > > *machine) > >     * 08:00:07 Apple > >     * (Q800 use the last one) > >     */ > > -    nd_table[0].macaddr.a[0] = 0x08; > > -    nd_table[0].macaddr.a[1]

Re: [PATCH v4 29/47] hw/arm/stellaris: use qemu_find_nic_info()

2024-01-31 Thread David Woodhouse
On Wed, 2024-01-31 at 13:13 +0100, Thomas Huth wrote: > > >    qdev_prop_set_uint32(ssys_dev, "user0", > > - macaddr[0] | (macaddr[1] << 8) | (macaddr[2] << > > 16)); > > + mac.a[0] | (mac.a[1] << 8) | (mac.a[2] << 16)); > >   

[PATCH v4] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2024-01-30 Thread David Woodhouse
From: David Woodhouse We can't just embed labels directly into files like qemu-options.hx which are included from multiple top-level rST files, because Sphinx sees the labels as duplicate: https://github.com/sphinx-doc/sphinx/issues/9707 So add an optional argument to the SRST directive which

Re: [PATCH v3] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2024-01-30 Thread David Woodhouse
On Tue, 2024-01-30 at 17:55 +, Peter Maydell wrote: > > This looks good so > Reviewed-by: Peter Maydell Thanks. > but something has got mangled somewhere: patchew can't apply it: > https://patchew.org/QEMU/4114f7204e892316d66be8f810eb5b8de4c0f75f.ca...@infradead.org/ > and patches doesn't

Re: [PATCH v3 00/46] Rework matching of network devices to -nic options

2024-01-28 Thread David Woodhouse
On Fri, 2024-01-26 at 17:51 +0100, Thomas Huth wrote: > On 25/01/2024 01.38, Jason Wang wrote: > > On Wed, Jan 24, 2024 at 9:14 PM David Woodhouse wrote: > > > > > > Hi Jason, > > > > > > I think this series probably lives or dies with you. I

[PATCH v3] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2024-01-27 Thread David Woodhouse
From: David Woodhouse We can't just embed labels directly into files like qemu-options.hx which are included from multiple top-level rST files, because Sphinx sees the labels as duplicate: https://github.com/sphinx-doc/sphinx/issues/9707 So add an optional argument to the SRST directive which

Re: [PATCH] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2024-01-27 Thread David Woodhouse
On Tue, 2023-12-12 at 15:04 +, Peter Maydell wrote: > > > --- a/docs/system/i386/xen.rst > > +++ b/docs/system/i386/xen.rst > > @@ -132,7 +132,7 @@ The example above provides the guest kernel command > > line after a separator > >   (" ``--`` ") on the Xen command line, and does not provide

Re: [PATCH v2 10/23] target/i386: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-27 Thread David Woodhouse
On Fri, 2024-01-26 at 23:03 +0100, Philippe Mathieu-Daudé wrote: > Mechanical patch produced running the command documented > in scripts/coccinelle/cpu_env.cocci_template header. > > Signed-off-by: Philippe Mathieu-Daudé > --- For the KVM/Xen parts Acked-by: David Woodhou

[PATCH v4 28/47] hw/arm/npcm7xx: use qemu_configure_nic_device, allow emc0/emc1 as aliases

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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 --- hw/arm/npcm7xx.c | 16 +--- tests/qtest/npcm7xx_emc-test.c | 18

[PATCH v4 43/47] hw/xtensa/xtfpga: use qemu_create_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/xtensa/xtfpga.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index fbad1c83a3..f49e6591dc 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw

[PATCH v4 13/47] hw/mips/malta: use pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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

[PATCH v4 14/47] hw/mips/loongson3_virt: use pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/mips/loongson3_virt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index 33eae01eca..caedde2df0 100644 --- a/hw/mips

[PATCH v4 01/47] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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

[PATCH v4 46/47] net: remove qemu_show_nic_models(), qemu_find_nic_model()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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

[PATCH v4 39/47] hw/openrisc/openrisc_sim: use qemu_create_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- hw/openrisc/openrisc_sim.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index 35da123aef..bffd6f721f 100644 --- a/hw/openrisc

[PATCH v4 18/47] hw/sh4/r2d: use pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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

[PATCH v4 45/47] hw/pci: remove pci_nic_init_nofail()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- hw/pci/pci.c | 72 include/hw/pci/pci.h | 3

[PATCH v4 06/47] hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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

[PATCH v4 17/47] hw/ppc: use pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/ppc/e500.c | 4 +--- hw/ppc/mac_newworld.c | 4 +--- hw/ppc/mac_oldworld.c | 4 +--- hw/ppc/ppc440_bamboo.c | 14 +- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git

[PATCH v4 23/47] hw/arm/exynos4: use qemu_create_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/arm/exynos4_boards.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c index b0e13eb4f0..003992189b 100644 --- a/hw/arm

[PATCH v4 24/47] hw/arm/fsl: use qemu_configure_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/arm/fsl-imx25.c | 2 +- hw/arm/fsl-imx6.c | 2 +- hw/arm/fsl-imx6ul.c | 2 +- hw/arm/fsl-imx7.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl

[PATCH v4 07/47] hw/alpha/dp264: use pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/alpha/dp264.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index 03495e1e60..52a1fa310b 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c

[PATCH v4 41/47] hw/s390x/s390-virtio-ccw: use qemu_create_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Acked-by: Thomas Huth --- hw/s390x/s390-virtio-ccw.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index c99682b07d..62804cc228 100644 --- a/hw/s390x

[PATCH v4 30/47] hw/arm: use qemu_configure_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- hw/arm/mps2-tz.c | 8 ++-- hw/arm/msf2-soc.c| 6 +- hw/arm/musicpal.c| 3 +-- hw/arm/xilinx_zynq.c | 11 --- hw/arm/xlnx-versal.c | 7 +-- hw/arm/xlnx-zynqmp.c | 8 +--- 6 files changed, 10

[PATCH v4 25/47] hw/net/smc91c111: use qemu_configure_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- hw

[PATCH v4 33/47] hw/m68k/q800: use qemu_find_nic_info()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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

[PATCH v4 12/47] hw/mips/fuloong2e: use pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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

[PATCH v4 22/47] hw/arm/aspeed: use qemu_configure_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Acked-by: Cédric Le Goater --- hw/arm/aspeed.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index cc59176563..bed5e4f40b 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c

[PATCH v4 35/47] hw/mips/mipssim: use qemu_create_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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 --- hw/mips/mipssim.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff

[PATCH v4 36/47] hw/mips/jazz: use qemu_find_nic_info()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- hw/mips/jazz.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 0d2348aa5a..5bf3e328db 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -119,15 +119,19 @@ static

[PATCH v4 44/47] net: remove qemu_check_nic_model()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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 Reviewed-by: Thomas Huth --- include/net/net.h | 1 - net/net.c | 13 - 2 files changed, 14

[PATCH v4 26/47] hw/net/lan9118: use qemu_configure_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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 --- hw/arm/kzm.c | 4 ++-- hw/arm

[PATCH v4 29/47] hw/arm/stellaris: use qemu_find_nic_info()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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

[PATCH v4 20/47] hw/xtensa/virt: use pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/xtensa/virt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c index a6cf646e99..5310a88861 100644 --- a/hw/xtensa/virt.c +++ b/hw/xtensa/virt.c

[PATCH v4 40/47] hw/riscv: use qemu_configure_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/riscv/microchip_pfsoc.c | 14 ++ hw/riscv/sifive_u.c| 7 +-- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/hw/riscv/microchip_pfsoc.c b/hw/riscv/microchip_pfsoc.c

[PATCH v4 38/47] hw/net/lasi_i82596: use qemu_create_nic_device()

2024-01-26 Thread David Woodhouse
From: David Woodhouse 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

  1   2   3   4   5   6   7   8   9   10   >