Re: Bad error handling in machine sifive-u

2021-12-07 Thread Alistair Francis
On Mon, Dec 6, 2021 at 11:15 PM Markus Armbruster wrote: > > Watch this: > > $ ../qemu/bld/qemu-system-riscv64 -M sifive_u -S -monitor stdio -display > none -drive if=pflash > QEMU 6.1.93 monitor - type 'help' for more information > (qemu) Unexpected error in sifive_u_otp_realize() at

Re: [PATCH] mirror: Avoid assertion failed in mirror_run

2021-12-07 Thread Hanna Reitz
[CC-ing qemu-block, Vladimir, Kevin, and John – when sending patches, please look into the MAINTAINERS file or use the scripts/get_maintainer.pl script to find out who to CC on them.  It’s very to overlook patches on qemu-devel :/] On 07.12.21 11:56, Yi Wang wrote: From: Long YunJian when b

[PATCH 1/7] migration: Drop dead code of ram_debug_dump_bitmap()

2021-12-07 Thread Peter Xu
I planned to add "#ifdef DEBUG_POSTCOPY" around the function too because otherwise it'll be compiled into qemu binary even if it'll never be used. Then I found that maybe it's easier to just drop it for good.. Signed-off-by: Peter Xu --- migration/ram.c | 39

[PATCH 0/7] migration: Postcopy cleanup on ram disgard

2021-12-07 Thread Peter Xu
Some queued patches for ram disgard cleanup, and some debug probes. QEMU's ram disgard logic is probably a bit hard to predict because we send a bunch of packets to notify the disgarded ranges rather than sending the bitmap. The packets to send depending on the bitmap layout. Initially I thought

[PATCH 7/7] migration: Finer grained tracepoints for POSTCOPY_LISTEN

2021-12-07 Thread Peter Xu
The enablement of postcopy listening has a few steps, add a few tracepoints to be there ready for some basic measurements for them. Signed-off-by: Peter Xu --- migration/savevm.c | 5 - migration/trace-events | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/migratio

[PATCH 4/7] migration: Do chunk page in postcopy_each_ram_send_discard()

2021-12-07 Thread Peter Xu
Right now we loop ramblocks for twice, the 1st time chunk the dirty bits with huge page information; the 2nd time we send the discard ranges. That's not necessary - we can do them in a single loop. Signed-off-by: Peter Xu --- migration/ram.c | 20 ++-- 1 file changed, 10 inserti

[PATCH 5/7] migration: Drop return code for disgard ram process

2021-12-07 Thread Peter Xu
It will just never fail. Drop those return values where they're constantly zeros. A tiny touch-up on the tracepoint so trace_ram_postcopy_send_discard_bitmap() is called after the logic itself (which sounds more reasonable). Signed-off-by: Peter Xu --- migration/migration.c | 5 + migrati

[PATCH 6/7] migration: Dump sub-cmd name in loadvm_process_command tp

2021-12-07 Thread Peter Xu
It'll be easier to read the name rather than index of sub-cmd when debugging. Signed-off-by: Peter Xu --- migration/savevm.c | 2 +- migration/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index d59e976d50..17b8e25

[PATCH 2/7] migration: Don't return for postcopy_chunk_hostpages()

2021-12-07 Thread Peter Xu
It always return zero, because it just can't go wrong so far. Simplify the code with no functional change. Signed-off-by: Peter Xu --- migration/ram.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 756ac800a7..fb8c1a887e 1

[PATCH 3/7] migration: Drop postcopy_chunk_hostpages()

2021-12-07 Thread Peter Xu
This function calls three functions: - postcopy_discard_send_init(ms, block->idstr); - postcopy_chunk_hostpages_pass(ms, block); - postcopy_discard_send_finish(ms); However only the 2nd function call is meaningful. It's major role is to make sure dirty bits are applied in host-page-size gr

Re: [PATCH v2] docs: Minor updates on the powernv documentation.

2021-12-07 Thread Leonardo Augusto Guimarães Garcia
On 12/2/21 03:51, Cédric Le Goater wrote: > Hello Leonardo, > > On 11/23/21 13:10, lagar...@linux.ibm.com wrote: >> From: Leonardo Garcia >> >> Signed-off-by: Leonardo Garcia >> --- > > It seems that POWER10 was renamed to Power10 but not POWER9. And : > >   https://en.wikipedia.org/wiki/Power9 

[PATCH] mirror: Avoid assertion failed in mirror_run

2021-12-07 Thread Yi Wang
From: Long YunJian when blockcommit from active leaf node, sometimes, we get assertion failed with "mirror_run: Assertion `QLIST_EMPTY(&bs->tracked_requests)' failed" messages. According to the core file, we find bs->tracked_requests has IO request, so assertion failed. (gdb) bt #0 0x7f410df

Re: [PATCH 07/14] ppc/pnv: Introduce a num_pecs class attribute for PHB4 PEC devices

2021-12-07 Thread Cédric Le Goater
On 12/7/21 11:00, Frederic Barrat wrote: On 02/12/2021 15:42, Cédric Le Goater wrote: POWER9 processor comes with 3 PHB4 PECs (PCI Express Controller) and each PEC can have several PHBs :    * PEC0 provides 1 PHB  (PHB0)    * PEC1 provides 2 PHBs (PHB1 and PHB2)    * PEC2 provides 3 PHBs (PHB

Re: [PATCH 13/14] ppc/pnv: Move realize of PEC stacks under the PEC model

2021-12-07 Thread Cédric Le Goater
On 12/7/21 11:10, Frederic Barrat wrote: On 02/12/2021 15:42, Cédric Le Goater wrote: This change will help us providing support for user created PHB4 devices. Signed-off-by: Cédric Le Goater ---   hw/pci-host/pnv_phb4_pec.c | 36   hw/ppc/pnv.c   

Re: [PATCH 12/14] ppc/pnv: Remove "system-memory" property for he PHB4 PEC model

2021-12-07 Thread Cédric Le Goater
On 12/7/21 11:08, Frederic Barrat wrote: On 02/12/2021 15:42, Cédric Le Goater wrote: This is not useful and will be in the way for support of user created PHB4 devices. Signed-off-by: Cédric Le Goater --- I doubt I see all the implications here, It is good practice to avoid statics in

Re: [PATCH 06/14] ppc/pnv: Complete user created PHB3 devices

2021-12-07 Thread Cédric Le Goater
On 12/7/21 10:53, Frederic Barrat wrote: On 02/12/2021 15:42, Cédric Le Goater wrote: PHB3s ared SysBus devices and should be allowed to be dynamically created. Signed-off-by: Cédric Le Goater --- This one is a bit of black magic for me. Yes. QEMU internals related to sysbus. I am not a

Re: [PATCH 11/14] ppc/pnv: Compute the PHB index from the PHB4 PEC model

2021-12-07 Thread Cédric Le Goater
On 12/7/21 11:06, Frederic Barrat wrote: On 02/12/2021 15:42, Cédric Le Goater wrote: Use the num_stacks class attribute to compute the PHB index depending on the PEC index :    * PEC0 provides 1 PHB  (PHB0)    * PEC1 provides 2 PHBs (PHB1 and PHB2)    * PEC2 provides 3 PHBs (PHB3, PHB4 and P

[PATCH v7 6/7] net/vmnet: update qemu-options.hx

2021-12-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- qemu-options.hx | 25 + 1 file changed, 25 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index ae2c6dbbfc..1ffa5eedd5 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2677,6 +2677,25 @@ DEF("netdev", HAS_ARG, QE

[PATCH v7 7/7] net/vmnet: update MAINTAINERS list

2021-12-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7543eb4d59..5c696e38da 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2631,6 +2631,11 @@ W: http://info.iet.unipi.it/~luigi/netmap/ S: Maintained F: net/n

[PATCH v7 3/7] net/vmnet: implement shared mode (vmnet-shared)

2021-12-07 Thread Vladislav Yaroshchuk
Interaction with vmnet.framework in different modes differs only on configuration stage, so we can create common `send`, `receive`, etc. procedures and reuse them. vmnet.framework supports iov, but writing more than one iov into vmnet interface fails with 'VMNET_INVALID_ARGUMENT'. Collecting provi

Re: [PATCH 08/14] ppc/pnv: Introduce version and device_id class atributes for PHB4 devices

2021-12-07 Thread Cédric Le Goater
On 12/7/21 11:01, Frederic Barrat wrote: On 02/12/2021 15:42, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- Empty log message ok in qemu? checkpatch didn't complain :) I might make an effort for v2. Thanks, C. But it looks ok to me.> Reviewed-by: Frederic Barrat  

[PATCH v7 2/7] net/vmnet: add vmnet backends to qapi/net

2021-12-07 Thread Vladislav Yaroshchuk
Create separate netdevs for each vmnet operating mode: - vmnet-host - vmnet-shared - vmnet-bridged Signed-off-by: Vladislav Yaroshchuk --- net/clients.h | 11 net/meson.build | 7 +++ net/net.c | 10 net/vmnet-bridged.m | 25 + net/vmnet-common.m | 20

[PATCH v7 0/7] Add vmnet.framework based network backend

2021-12-07 Thread Vladislav Yaroshchuk
macOS provides networking API for VMs called 'vmnet.framework': https://developer.apple.com/documentation/vmnet We can provide its support as the new QEMU network backends which represent three different vmnet.framework interface usage modes: * `vmnet-shared`: allows the guest to communicat

[PATCH v7 5/7] net/vmnet: implement bridged mode (vmnet-bridged)

2021-12-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- net/vmnet-bridged.m | 98 ++--- 1 file changed, 92 insertions(+), 6 deletions(-) diff --git a/net/vmnet-bridged.m b/net/vmnet-bridged.m index 4e42a90391..3c9da9dc8b 100644 --- a/net/vmnet-bridged.m +++ b/net/vmnet-br

[PATCH v7 4/7] net/vmnet: implement host mode (vmnet-host)

2021-12-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- net/vmnet-host.c | 93 1 file changed, 87 insertions(+), 6 deletions(-) diff --git a/net/vmnet-host.c b/net/vmnet-host.c index 4a5ef99dc7..9c2e760ed1 100644 --- a/net/vmnet-host.c +++ b/net/vmnet-host.c @@ -

[PATCH v7 1/7] net/vmnet: add vmnet dependency and customizable option

2021-12-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- meson.build | 4 meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/meson.build b/meson.build index 96de1a6ef9..ce8acf6ada 100644 --- a/meson.build +++ b/meson.b

Re: [PATCH 04/14] ppc/pnv: Introduce support for user created PHB3 devices

2021-12-07 Thread Cédric Le Goater
On 12/7/21 10:47, Frederic Barrat wrote: On 02/12/2021 15:42, Cédric Le Goater wrote: PHB3 devices and PCI devices can now be added to the powernv8 machine using :    -device pnv-phb3,chip-id=0,index=1 \    -device nec-usb-xhci,bus=pci.1,addr=0x0 The 'index' property identifies the PHB3 in t

Re: [PATCH 13/14] ppc/pnv: Move realize of PEC stacks under the PEC model

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: This change will help us providing support for user created PHB4 devices. Signed-off-by: Cédric Le Goater --- hw/pci-host/pnv_phb4_pec.c | 36 hw/ppc/pnv.c | 31 +--

Re: [PATCH 14/14] ppc/pnv: Introduce support for user created PHB4 devices

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: PHB4 devices and PCI devices can now be added to the powernv9 machine using: -device pnv-phb4-pec,chip-id=0,index=0 -device nec-usb-xhci,bus=pci.0,addr=0x0 In case of user created devices, a lookup on 'chip-id' is required to assign the owni

Re: [PATCH 12/14] ppc/pnv: Remove "system-memory" property for he PHB4 PEC model

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: This is not useful and will be in the way for support of user created PHB4 devices. Signed-off-by: Cédric Le Goater --- I forgot to mention the typo in the commit title: "he PHB4". Fred hw/pci-host/pnv_phb4_pec.c | 6 +- hw/ppc/pnv

Re: [PATCH v4 08/22] target/riscv: Allow AIA device emulation to set ireg rmw callback

2021-12-07 Thread Anup Patel
On Thu, Nov 4, 2021 at 10:23 AM Alistair Francis wrote: > > On Tue, Oct 26, 2021 at 6:00 PM Anup Patel wrote: > > > > The AIA device emulation (such as AIA IMSIC) should be able to set > > (or provide) AIA ireg read-modify-write callback for each privilege > > level of a RISC-V HART. > > > > Sign

Re: [PATCH 01/14] ppc/pnv: Reduce the maximum of PHB3 devices

2021-12-07 Thread Cédric Le Goater
On 12/7/21 10:40, Frederic Barrat wrote: On 02/12/2021 15:42, Cédric Le Goater wrote: All POWER8 machines have a maximum of 3 PHB3 devices. Adapt the PNV8_CHIP_PHB3_MAX definition for consistency. Signed-off-by: Cédric Le Goater --- The Naples chip (Garrison) can have 4 PHBs and it seems

Re: [PATCH 12/14] ppc/pnv: Remove "system-memory" property for he PHB4 PEC model

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: This is not useful and will be in the way for support of user created PHB4 devices. Signed-off-by: Cédric Le Goater --- I doubt I see all the implications here, but it doesn't look wrong to me, so: Reviewed-by: Frederic Barrat Fred h

Re: [PATCH 11/14] ppc/pnv: Compute the PHB index from the PHB4 PEC model

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: Use the num_stacks class attribute to compute the PHB index depending on the PEC index : * PEC0 provides 1 PHB (PHB0) * PEC1 provides 2 PHBs (PHB1 and PHB2) * PEC2 provides 3 PHBs (PHB3, PHB4 and PHB5) Signed-off-by: Cédric Le Goater --

Re: [PATCH 10/14] ppc/pnv: Introduce a num_stack class attribute

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: Each PEC devices of the POWER9 chip has a predefined number of stacks, equivalent of a root port complex: PEC0 -> 1 stack PEC1 -> 2 stacks PEC2 -> 3 stacks Introduce a class attribute to hold these values and remove the "num-stacks" prope

Re: [PATCH 09/14] ppc/pnv: Introduce a "chip" property under the PHB4 model

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: Next changes will make use of it. Signed-off-by: Cédric Le Goater --- Reviewed-by: Frederic Barrat include/hw/pci-host/pnv_phb4.h | 2 ++ hw/pci-host/pnv_phb4_pec.c | 2 ++ hw/ppc/pnv.c | 2 ++ 3 files changed, 6 i

Re: [PATCH 08/14] ppc/pnv: Introduce version and device_id class atributes for PHB4 devices

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- Empty log message ok in qemu? But it looks ok to me. Reviewed-by: Frederic Barrat include/hw/pci-host/pnv_phb4.h | 2 ++ hw/pci-host/pnv_phb4_pec.c | 2 ++ hw/ppc/pnv.c | 4 ++--

Re: [PATCH 07/14] ppc/pnv: Introduce a num_pecs class attribute for PHB4 PEC devices

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: POWER9 processor comes with 3 PHB4 PECs (PCI Express Controller) and each PEC can have several PHBs : * PEC0 provides 1 PHB (PHB0) * PEC1 provides 2 PHBs (PHB1 and PHB2) * PEC2 provides 3 PHBs (PHB3, PHB4 and PHB5) A num_pecs class attri

Re: [PATCH 06/14] ppc/pnv: Complete user created PHB3 devices

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: PHB3s ared SysBus devices and should be allowed to be dynamically created. Signed-off-by: Cédric Le Goater --- This one is a bit of black magic for me. I don't see an equivalent for P9 though. Not needed there? I'll have another comment about P

Re: [PATCH 05/14] ppc/pnv: Reparent user created PHB3 devices to the PnvChip

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: The powernv machine uses the object hierarchy to populate the device tree and each device should be parented to the chip it belongs to. This is not the case for user created devices which are parented to the container "/unattached". Make sure a PHB

[PATCH v3] ppc/pnv.c: fix "system-id" FDT when -uuid is set

2021-12-07 Thread Daniel Henrique Barboza
Setting -uuid in the pnv machine does not work: ./qemu-system-ppc64 -machine powernv8,accel=tcg -uuid 7ff61ca1-a4a0-4bc1-944c-abd114a35e80 qemu-system-ppc64: error creating device tree: (fdt_property_string(fdt, "system-id", buf)): FDT_ERR_BADSTATE This happens because we're using fdt_property

Re: [PATCH v10 7/8] qmp: add QMP command x-query-virtio-queue-element

2021-12-07 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command shows the information of a VirtQueue element. > > Signed-off-by: Jonah Palmer > --- > hw/virtio/virtio-stub.c | 9 +++ > hw/virtio/virtio.c | 154 > qapi/virtio.json| 183 >

Re: [PATCH 04/14] ppc/pnv: Introduce support for user created PHB3 devices

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: PHB3 devices and PCI devices can now be added to the powernv8 machine using : -device pnv-phb3,chip-id=0,index=1 \ -device nec-usb-xhci,bus=pci.1,addr=0x0 The 'index' property identifies the PHB3 in the chip. In case of user created devices,

Re: [PATCH v2] ppc/pnv.c: fix "system-id" FDT when -uuid is set

2021-12-07 Thread Daniel Henrique Barboza
On 12/6/21 21:09, David Gibson wrote: On Mon, Dec 06, 2021 at 10:02:53AM -0300, Daniel Henrique Barboza wrote: Setting -uuid in the pnv machine does not work: ./qemu-system-ppc64 -machine powernv8,accel=tcg -uuid 7ff61ca1-a4a0-4bc1-944c-abd114a35e80 qemu-system-ppc64: error creating device

[PATCH v2 for 6.2?] gicv3: fix ICH_MISR's LRENP computation

2021-12-07 Thread Damien Hedde
According to the "Arm Generic Interrupt Controller Architecture Specification GIC architecture version 3 and 4" (version G: page 345 for aarch64 or 509 for aarch32): LRENP bit of ICH_MISR is set when ICH_HCR.LRENPIE==1 and ICH_HCR.EOIcount is non-zero. When only LRENPIE was set (and EOI count was

Re: [PATCH 03/14] ppc/pnv: Move mapping of the PHB3 CQ regions under pnv_pbcq_realize()

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: This requires a link to the chip to add the regions under the XSCOM address space. This change will help us providing support for user created PHB3 devices. Signed-off-by: Cédric Le Goater --- Reviewed-by: Frederic Barrat include/hw/pci-h

Re: [PATCH 02/14] ppc/pnv: Drop the "num-phbs" property

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: It is never used. Signed-off-by: Cédric Le Goater --- Reviewed-by: Frederic Barrat hw/ppc/pnv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index bd768dcc28ad..988b305398b2 100644 --- a/hw/ppc/pnv.c +++

Re: [PATCH 01/14] ppc/pnv: Reduce the maximum of PHB3 devices

2021-12-07 Thread Frederic Barrat
On 02/12/2021 15:42, Cédric Le Goater wrote: All POWER8 machines have a maximum of 3 PHB3 devices. Adapt the PNV8_CHIP_PHB3_MAX definition for consistency. Signed-off-by: Cédric Le Goater --- The Naples chip (Garrison) can have 4 PHBs and it seems we have a power8nvl machine type for it.

Re: [PATCH for 6.2?] gicv3: fix ICH_MISR's LRENP computation

2021-12-07 Thread Damien Hedde
Sorry for the inconvenience, I screwed-up with the subject line. Should I resend ? Damien On 12/7/21 10:29, Damien Hedde wrote: Subject: [PATCH for 6.2?] gicv3: fix ICH_MISR's LRENP computation According to the "Arm Generic Interrupt Controller Architecture Specification GIC architecture versi

Re: [PATCH v10 6/8] qmp: add QMP commands for virtio/vhost queue-status

2021-12-07 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > These new commands show the internal status of a VirtIODevice's > VirtQueue and a vhost device's vhost_virtqueue (if active). > > Signed-off-by: Jonah Palmer > --- [...] > diff --git a/qapi/virtio.json b/qapi/virtio.json > index 7ef1f95..56e56d2

[no subject]

2021-12-07 Thread Damien Hedde
Subject: [PATCH for 6.2?] gicv3: fix ICH_MISR's LRENP computation According to the "Arm Generic Interrupt Controller Architecture Specification GIC architecture version 3 and 4" (version G: page 345 for aarch64 or 509 for aarch32): LRENP bit of ICH_MISR is set when ICH_HCR.LRENPIE==1 and ICH_HCR.E

Re: [PATCH] spec: Add NBD_OPT_EXTENDED_HEADERS

2021-12-07 Thread Vladimir Sementsov-Ogievskiy
07.12.2021 02:00, Eric Blake wrote: On Mon, Dec 06, 2021 at 02:40:45PM +0300, Vladimir Sementsov-Ogievskiy wrote: Simple reply message The simple reply message MUST be sent by the server in response to all requests if structured replies have not been negotiated using -`NBD_OPT_STR

[PATCH for-7.0] tests/qtest: Make the netfilter test independent from a specific NIC

2021-12-07 Thread Thomas Huth
The netfilter test needs a NIC, no matter which one, so it uses e1000 by default (or virtio-net-ccw on s390x). However, this NIC might not be always compiled into the QEMU target binary, so assuming that this NIC is always available is a bad idea. Since the exact type of NIC does not really matter

Re: [PATCH v6 6/6] tests/libqtest: add a migration test with two couples of failover devices

2021-12-07 Thread Thomas Huth
On 06/12/2021 23.20, Laurent Vivier wrote: Signed-off-by: Laurent Vivier --- tests/qtest/virtio-net-failover.c | 279 ++ 1 file changed, 279 insertions(+) diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c index 57abb99e7f6e..ace90

Re: [PATCH v6 5/6] test/libqtest: add some virtio-net failover migration cancelling tests

2021-12-07 Thread Thomas Huth
On 06/12/2021 23.20, Laurent Vivier wrote: Add some tests to check the state of the machine if the migration is cancelled while we are using virtio-net failover. Signed-off-by: Laurent Vivier --- tests/qtest/virtio-net-failover.c | 291 ++ 1 file changed, 291 inse

Re: [PATCH v6 4/6] tests/libqtest: update virtio-net failover test

2021-12-07 Thread Thomas Huth
On 06/12/2021 23.20, Laurent Vivier wrote: Update the migration test to check we correctly wait the end of the card unplug before doing the migration. Signed-off-by: Laurent Vivier --- tests/qtest/virtio-net-failover.c | 34 +++ 1 file changed, 34 insertions(+) d

Re: [PATCH v1 1/2] hostmem: use a static size for maxnode, validate policy everywhere

2021-12-07 Thread David Hildenbrand
On 07.12.21 08:06, Daniil Tatianin wrote: > Previously we would calculate the last set bit in the mask, and add > 2 to that value to get the maxnode value. This is unnecessary since > the mbind syscall allows the bitmap to be any (reasonable) size as > long as all the unused bits are clear. This al

Re: [PATCH v6 2/6] tests/qtest: add some tests for virtio-net failover

2021-12-07 Thread Thomas Huth
On 06/12/2021 23.20, Laurent Vivier wrote: Add test cases to test several error cases that must be generated by invalid failover configuration. Add a combination of coldplug and hotplug test cases to be sure the primary is correctly managed according the presence or not of the STANDBY feature.

Re: [PATCH v1 2/2] osdep: support mempolicy for preallocation in os_mem_prealloc

2021-12-07 Thread David Hildenbrand
On 07.12.21 08:06, Daniil Tatianin wrote: > This is needed for cases where we want to make sure that a shared memory > region gets allocated from a specific NUMA node. This is impossible to do > with mbind(2) because it ignores the policy for memory mapped with > MAP_SHARED. We work around this by

Re: [PATCH v6 1/6] qtest/libqos: add a function to initialize secondary PCI buses

2021-12-07 Thread Thomas Huth
On 06/12/2021 23.20, Laurent Vivier wrote: Scan the PCI devices to find bridge and set PCI_SECONDARY_BUS and PCI_SUBORDINATE_BUS (algorithm from seabios) Signed-off-by: Laurent Vivier --- include/hw/pci/pci_bridge.h | 8 +++ tests/qtest/libqos/pci.c| 118 +++

Re: [RFC v3 19/19] vfio-user: migration support

2021-12-07 Thread John Johnson
> On Nov 19, 2021, at 2:42 PM, Alex Williamson > wrote: > > On Mon, 8 Nov 2021 16:46:47 -0800 > John Johnson wrote: > >> bug fix: only set qemu file error if there is a file > > > I don't understand this commit log. Is this meant to be a revision > log? In general it would be nice to h

Re: [RFC v3 11/19] vfio-user: get region info

2021-12-07 Thread John Johnson
> On Nov 19, 2021, at 2:42 PM, Alex Williamson > wrote: > > On Mon, 8 Nov 2021 16:46:39 -0800 > John Johnson wrote: > >> Signed-off-by: Elena Ufimtseva >> Signed-off-by: John G Johnson >> Signed-off-by: Jagannathan Raman >> --- >> hw/vfio/user-protocol.h | 14 >> includ

<    1   2