Re: [PATCH 2/3] vl: disable default serial when xen-console is enabled

2023-11-21 Thread David Woodhouse
On Tue, 2023-11-21 at 14:58 +0400, Marc-André Lureau wrote: > > > Consistent with the rest of the lines (no conditional compilation nor > > driver #define..) > > Reviewed-by: Marc-André Lureau Thanks. > > btw, while quickly testing this (do we have any test for xen-console?): > > > > $ qemu --

Re: [PATCH 06/12] hw/xen: add get_frontend_path() method to XenDeviceClass

2023-11-21 Thread David Woodhouse
On Tue, 2023-10-24 at 14:29 +0100, David Woodhouse wrote: > > > > As a general rule (I'll be doing a bombing run on xen-bus once I get my > > > patch queue down into single digits) we should never check 'if (*errp)' > > > to check if a function ha

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 nee

Re: [PATCH v2 3/6] xen: xenstore: add possibility to preserve owner

2023-11-22 Thread David Woodhouse
On Tue, 2023-11-21 at 22:10 +, Volodymyr Babchuk wrote: > > --- a/hw/xen/xen-operations.c > +++ b/hw/xen/xen-operations.c > @@ -300,6 +300,18 @@ static bool libxenstore_create(struct qemu_xs_handle *h, > xs_transaction_t t, > return false; > } >   > +    if (owner == XS_PRESERVE

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-22 Thread David Woodhouse
On Wed, 2023-11-22 at 14:29 -0800, Stefano Stabellini wrote: > On Wed, 22 Nov 2023, Paul Durrant wrote: > > On 21/11/2023 22:10, Volodymyr Babchuk wrote: > > > From: Oleksandr Tyshchenko > > > > > > Instead of forcing the owner to domid 0, use XS_PRESERVE_OWNER to > > > inherit the owner of the d

Re: [PATCH v2 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it

2023-11-22 Thread David Woodhouse
On Wed, 2023-11-22 at 22:56 +, Volodymyr Babchuk wrote: > > > Paul Durrant writes: > > > On 21/11/2023 22:10, Volodymyr Babchuk wrote: > > > From: David Woodhouse > > > This allows a XenDevice implementation to know whether it was > > > c

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-22 Thread David Woodhouse
On Wed, 2023-11-22 at 15:09 -0800, Stefano Stabellini wrote: > On Wed, 22 Nov 2023, David Woodhouse wrote: > > On Wed, 2023-11-22 at 14:29 -0800, Stefano Stabellini wrote: > > > On Wed, 22 Nov 2023, Paul Durrant wrote: > > > > On 21/11/2023 22:10, Volodymyr Babchuk wr

Re: [PATCH v2 2/6] xen: backends: touch some XenStore nodes only if device...

2023-11-22 Thread David Woodhouse
On Wed, 2023-11-22 at 22:49 +, Volodymyr Babchuk wrote: > > > On 21/11/23 23:10, Volodymyr Babchuk wrote: > > > was created by QEMU > > > > Please do not split lines between subject and content. Rewrite the > > full line. Preferably restrict the subject to 72 chars. > > I tried to come with

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-23 Thread David Woodhouse
On Thu, 2023-11-23 at 09:28 +, Paul Durrant wrote: > On 23/11/2023 00:07, Volodymyr Babchuk wrote: > > > > Hi, > > > > Volodymyr Babchuk writes: > > > > > Hi Stefano, > > > > > > Stefano Stabellini writes: > > > >

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-23 Thread David Woodhouse
On 23 November 2023 11:43:35 GMT, Volodymyr Babchuk wrote: > >Hi David, > >David Woodhouse writes: > >> [[S/MIME Signed Part:Undecided]] >> On Thu, 2023-11-23 at 09:28 +, Paul Durrant wrote: >>> On 23/11/2023 00:07, Volodymyr Babchuk wrote: >>>

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-23 Thread David Woodhouse
On 23 November 2023 11:54:01 GMT, Volodymyr Babchuk wrote: > >Hi Paul, > >Paul Durrant writes: > >> On 23/11/2023 00:07, Volodymyr Babchuk wrote: >>> Hi, >>> Volodymyr Babchuk writes: >>> >>>> Hi Stefano, >>>> >>

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-23 Thread David Woodhouse
On 23 November 2023 12:17:57 GMT, Volodymyr Babchuk wrote: > >Hi David, > >David Woodhouse writes: >> Which PV backends do you care about? We already have net, block and console >> converted. > >Well, this is all what we need, actually. Even console only will b

Re: [EXTERNAL] [PATCH v3 2/5] xen: backends: don't overwrite XenStore nodes created by toolstack

2023-11-27 Thread David Woodhouse
stack to decide if it should touch > frontend entries in XenStore. Also, when we need to remove XenStore > entries during device teardown only if they weren't created by Xen > toolstack. If they were created by toolstack, then it is toolstack's > job to do proper clean-up. >

Re: [EXTERNAL] [PATCH v3 2/5] xen: backends: don't overwrite XenStore nodes created by toolstack

2023-11-28 Thread David Woodhouse
On Tue, 2023-11-28 at 01:20 +, Volodymyr Babchuk wrote: > Hi David, > > Thank you for the review > > David Woodhouse writes: > > > [[S/MIME Signed Part:Undecided]] > > On Fri, 2023-11-24 at 23:24 +, Volodymyr Babchuk wrote: > > > Xen PV dev

Re: [PATCH 2/6] qemu/main-loop: rename QEMU_IOTHREAD_LOCK_GUARD to QEMU_BQL_LOCK_GUARD

2023-11-30 Thread David Woodhouse
On Wed, 2023-11-29 at 16:26 -0500, Stefan Hajnoczi wrote: > The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL) > instead, it is already widely used and unambiguous. > > Signed-off-by: Stefan Hajnoczi Acked-by: David Woodhouse smime.p7s Description

Re: [PATCH 1/6] system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()

2023-11-30 Thread David Woodhouse
void) > - bool qemu_bql_locked(void) > > There are more APIs with "iothread" in their names. Subsequent patches > will rename them. There are also comments and documentation that will be > updated in later patches. > > Signed-off-by: Stefan Hajnoczi Acked-by: David Woodhouse smime.p7s Description: S/MIME cryptographic signature

Re: INFORMAL VOTE REQUIRED - DOCUMENTATION WORDING

2023-12-11 Thread David Woodhouse
On Fri, 2023-12-01 at 10:27 +, George Dunlap wrote: > > FWIW I think a "five-point survey" would probably have been somewhat better: > > Regarding the review insisting that the word "broken" be removed from > the updated documentation to the old hypercall: (✔) I think this sort of enforcemen

[PATCH v3 20/46] hw/xtensa/virt: use pci_init_nic_devices()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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 @@ -102,9 +102,7 @@ static void

[PATCH v3 18/46] hw/sh4/r2d: use pci_init_nic_devices()

2024-01-08 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 v3 13/46] hw/mips/malta: use pci_init_nic_devices()

2024-01-08 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, and then

[PATCH v3 35/46] hw/mips/mipssim: use qemu_create_nic_device()

2024-01-08 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 v3 11/46] hw/loongarch: use pci_init_nic_devices()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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 4b7dc67a2d..c48804ac38 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -504,9 +504,7

[PATCH v3 29/46] hw/arm/stellaris: use qemu_find_nic_info()

2024-01-08 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 wou

[PATCH v3 30/46] hw/arm: use qemu_configure_nic_device()

2024-01-08 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 v3 43/46] net: remove qemu_check_nic_model()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- include/net/net.h | 1 - net/net.c | 13 - 2 files changed, 14 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 31e63d1f0d..1be8b40074 100644 --- a/include/net/net.h +++ b/include/net/net.h

[PATCH v3 27/46] hw/arm/highbank: use qemu_create_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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 c21e18d08f..6a0e20e58d 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -296,19

[PATCH v3 39/46] hw/riscv: use qemu_configure_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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 index b775aa8946..7725dfbde5

[PATCH v3 14/46] hw/mips/loongson3_virt: use pci_init_nic_devices()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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/loongson3_virt.c +++ b/hw/mips

[PATCH v3 34/46] hw/microblaze: use qemu_configure_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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/microblaze/petalogix_ml605_mmu.c

[PATCH v3 24/46] hw/arm/fsl: use qemu_configure_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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-imx25.c index 9d2fb75a68

[PATCH v3 10/46] hw/hppa: use pci_init_nic_devices()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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 c8da7c18d5..19d477105e 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -338,7 +338,6

[PATCH v3 07/46] hw/alpha/dp264: use pci_init_nic_devices()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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 @@ -124,9 +124,7 @@ static void

[PATCH v3 21/46] hw/arm/allwinner: use qemu_configure_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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-a10.c b/hw/arm/allwinner

[PATCH v3 42/46] hw/xtensa/xtfpga: use qemu_create_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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/xtensa/xtfpga.c @@ -141,14

[PATCH v3 38/46] hw/openrisc/openrisc_sim: use qemu_create_nic_device()

2024-01-08 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 v3 16/46] hw/ppc/spapr: use qemu_get_nic_info() and pci_init_nic_devices()

2024-01-08 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 --- hw/ppc/spapr.c | 18

[PATCH v3 22/46] hw/arm/aspeed: use qemu_configure_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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 @@ -356,7 +356,6 @@ static

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

2024-01-08 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 v3 40/46] hw/s390x/s390-virtio-ccw: use qemu_create_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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 1169e20b94..202c378131 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b

[PATCH v3 26/46] hw/net/lan9118: use qemu_configure_nic_device()

2024-01-08 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 v3 00/46] Rework matching of network devices to -nic options

2024-01-08 Thread David Woodhouse
series because I'm putting the less invasive hack into 8.2 (hopefully). David Woodhouse (46): 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()

[PATCH v3 09/46] hw/arm/virt: use pci_init_nic_devices()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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 2793121cb4..8cf9237001 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1454,9 +1454,7 @@ static void create_pcie

[PATCH v3 37/46] hw/net/lasi_i82596: use qemu_configure_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- hw/net/lasi_i82596.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/net/lasi_i82596.c b/hw/net/lasi_i82596.c index 6a3147fe2d..2bb4f2c4ca 100644 --- a/hw/net/lasi_i82596.c +++ b/hw/net/lasi_i82596.c @@ -125,11

[PATCH v3 45/46] net: remove qemu_show_nic_models(), qemu_find_nic_model()

2024-01-08 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

[PATCH v3 02/46] net: report list of available models according to platform

2024-01-08 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

[PATCH v3 03/46] net: add qemu_create_nic_bus_devices()

2024-01-08 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

[PATCH v3 15/46] hw/ppc/prep: use pci_init_nic_devices()

2024-01-08 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 to be

[PATCH v3 32/46] hw/m68k/mcf5208: use qemu_create_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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/hw/m68k/mcf5208.c

[PATCH v3 23/46] hw/arm/exynos4: use qemu_create_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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/exynos4_boards.c +++ b/hw/arm

[PATCH v3 25/46] hw/net/smc91c111: use qemu_configure_nic_device()

2024-01-08 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 for now. Signed-off-by: David Woodhouse --- hw/arm/gumstix.c | 6 ++ hw

[PATCH v3 05/46] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2024-01-08 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| 26

[PATCH v3 08/46] hw/arm/sbsa-ref: use pci_init_nic_devices()

2024-01-08 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 477dca0637..f0171176ea 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa

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

2024-01-08 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

[PATCH v3 12/46] hw/mips/fuloong2e: use pci_init_nic_devices()

2024-01-08 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 a anything

[PATCH v3 44/46] hw/pci: remove pci_nic_init_nofail()

2024-01-08 Thread David Woodhouse
From: David Woodhouse This function is no longer used. Signed-off-by: David Woodhouse --- hw/pci/pci.c | 72 include/hw/pci/pci.h | 3 -- 2 files changed, 75 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 5849606f66

[PATCH v3 19/46] hw/sparc64/sun4u: use pci_init_nic_devices()

2024-01-08 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 --- hw/sparc64

[PATCH v3 17/46] hw/ppc: use pci_init_nic_devices()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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 a/hw/ppc/e500.c b/hw/ppc/e500

[PATCH v3 41/46] hw/sparc/sun4m: use qemu_find_nic_info()

2024-01-08 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 --- hw/sparc/sun4m.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git

[PATCH v3 36/46] hw/mips/jazz: use qemu_find_nic_info()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Extract the MAC address from the NICInfo, or generate one explicitly if there was no corresponding NIC configuration, to put it in the PROM. Signed-off-by: David Woodhouse --- hw/mips/jazz.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff

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

2024-01-08 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 var

[PATCH v3 04/46] hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot()

2024-01-08 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-by

[PATCH v3 31/46] hw/net/etraxfs-eth: use qemu_configure_nic_device()

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- 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/axis_dev88.c index d82050d927

[PATCH v3 46/46] net: make nb_nics and nd_table[] static in net/net.c

2024-01-08 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- include/net/net.h | 4 net/net.c | 3 +++ system/globals.c | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 19fb82833c..766201c62c 100644 --- a/include/net

[PATCH v3 33/46] hw/m68k/q800: use qemu_find_nic_info()

2024-01-08 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 the

Re: [PATCH] hw/i386/pc_piix: Make piix_intx_routing_notifier_xen() more device independent

2024-01-09 Thread David Woodhouse
ll this code is written with the apparent assumption that there is only *one* IRQ# which is the target for a given INTx, when in fact it gets routed to that pin# on the legacy PIC and a potentially *different* pin# on the I/O APIC. But you aren't making that worse, so Reviewed-by: David Woodhouse smime.p7s Description: S/MIME cryptographic signature

Re: [PATCH] x86/hvm: don't expose XENFEAT_hvm_pirqs by default

2024-01-11 Thread David Woodhouse
On Wed, 2024-01-10 at 11:26 +0100, Jan Beulich wrote: > On 10.01.2024 10:53, Roger Pau Monne wrote: > > The HVM pirq feature allows routing interrupts from both physical and > > emulated > > devices over event channels, this was done a performance improvement.  > > However > > its usage is fully

Re: Community Process Group - Proposal

2024-01-24 Thread David Woodhouse
On Tue, 2024-01-23 at 08:34 +0100, Jan Beulich wrote: > On 22.01.2024 23:47, Stefano Stabellini wrote: > > On Mon, 22 Jan 2024, Jan Beulich wrote: > > > What definitely needs clarifying is what "review" is: Are R-b tags > > > counted, or is it the number of replies sent commenting on patches? > >

Re: [PATCH v3 05/46] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
On Fri, 2024-01-26 at 11:43 +0100, Thomas Huth wrote: > On 08/01/2024 21.26, David Woodhouse wrote: > > 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

Re: [PATCH v3 05/46] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
On Fri, 2024-01-26 at 12:20 +0100, Thomas Huth wrote: > On 26/01/2024 12.13, David Woodhouse wrote: > > On Fri, 2024-01-26 at 11:43 +0100, Thomas Huth wrote: > > > On 08/01/2024 21.26, David Woodhouse wrote: > > > > From: David Woodhouse > > > > > &g

Re: [PATCH v4 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it

2024-01-26 Thread David Woodhouse
On Sat, 2023-12-02 at 01:41 +, Volodymyr Babchuk wrote: > From: David Woodhouse > > This allows a XenDevice implementation to know whether it was created > by QEMU, or merely discovered in XenStore after the toolstack created > it. This will allow us to create frontend/bac

Re: [PATCH v3 05/46] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
On Fri, 2024-01-26 at 14:45 +0100, Thomas Huth wrote: > I think the nicest compromise is to add the "Error **errp" to the > pc_init_ne2k_isa() and change the caller to pass in &error_fatal there ... > further clean-up (passing the error even up further in the stack) is out of > scope of this ser

Re: [PATCH v3 01/46] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info()

2024-01-26 Thread David Woodhouse
On Fri, 2024-01-26 at 12:10 +0100, Thomas Huth wrote: > > > +/* "Please create a device, if you have a configuration for it" */ > > +DeviceState *qemu_create_nic_device(const char *typename, bool > > match_default, > > +    const char *alias) > > +{ > > +    NICInf

Re: [PATCH v3 01/46] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info()

2024-01-26 Thread David Woodhouse
On Fri, 2024-01-26 at 15:24 +0100, Thomas Huth wrote: > On 26/01/2024 15.16, David Woodhouse wrote: > > On Fri, 2024-01-26 at 12:10 +0100, Thomas Huth wrote: > > > > > > > +/* "Please create a device, if you have a configuration for it" */ > > >

Re: [PATCH v3 01/46] net: add qemu_{configure,create}_nic_device(), qemu_find_nic_info()

2024-01-26 Thread David Woodhouse
On Fri, 2024-01-26 at 14:43 +, Peter Maydell wrote: > > > +NICInfo *qemu_find_nic_info(const char *typename, bool match_default, > > +    const char *alias); > > +bool qemu_configure_nic_device(DeviceState *dev, bool match_default, > > +   co

Re: [PATCH v3 01/46] net: add qemu_{configure,create}_nic_device(), qemu_find_nic_info()

2024-01-26 Thread David Woodhouse
On Fri, 2024-01-26 at 15:33 +, Peter Maydell wrote: > On Fri, 26 Jan 2024 at 15:20, David Woodhouse wrote: > > > > On Fri, 2024-01-26 at 14:43 +, Peter Maydell wrote: > > > > > > > +NICInfo *qemu_find_nic_info(cons

Re: [PATCH v3 45/46] net: remove qemu_show_nic_models(), qemu_find_nic_model()

2024-01-26 Thread David Woodhouse
On Fri, 2024-01-26 at 17:49 +0100, Thomas Huth wrote: > > Can we please keep "Available" instead of "Supported" ? ... since not each > NIC is supported on each machine type... Done, thanks. smime.p7s Description: S/MIME cryptographic signature

[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 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 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 16/47] hw/ppc/spapr: use qemu_get_nic_info() and pci_init_nic_devices()

2024-01-26 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

[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 31/47] hw/net/etraxfs-eth: use qemu_configure_nic_device()

2024-01-26 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

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

2024-01-26 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 477dca0637..f0171176ea 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa

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

2024-01-26 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-by

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

2024-01-26 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

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

2024-01-26 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

[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 the

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

2024-01-26 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

[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

[PATCH v4 21/47] hw/arm/allwinner: 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/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

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

2024-01-26 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-by

[PATCH v4 03/47] net: add qemu_create_nic_bus_devices()

2024-01-26 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

[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 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 wou

[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 a

[PATCH v4 09/47] hw/arm/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/arm/virt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 5cbc69dff8..ad8e7edb8c 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1454,9 +1454,7

[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 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 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 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

<    3   4   5   6   7   8   9   10   >