Re: [PATCH v3 3/4] failover: really display a warning when the primary device is not found

2021-02-12 Thread Jens Freimann
(+), 11 deletions(-) Thank you Laurent! Reviewed-by: Jens Freimann regards, Jens

Re: [PATCH 2/2] virtio-net: add missing object_unref()

2021-02-08 Thread Jens Freimann
Remove primary_dev member") Cc: quint...@redhat.com Signed-off-by: Laurent Vivier --- hw/net/virtio-net.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Jens Freimann Thank you Laurent! regards, Jens

Re: [PATCH 1/2] pci: cleanup failover sanity check

2021-02-08 Thread Jens Freimann
le changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Jens Freimann Thank you Laurent! regards, Jens

Re: Documents not in sphinx toctree

2020-11-05 Thread Jens Freimann
On Thu, Nov 05, 2020 at 04:19:00PM +, Peter Maydell wrote: On Thu, 5 Nov 2020 at 16:14, Marc-André Lureau wrote: By running sphinx over the docs/ directory (like readthedocs.org presumably does), it finds a couple of rst documents that are not referenced: - cpu-hotplug.rst - microvm.rst -

Re: [PULL 1/2] error: Remove NULL checks on error_propagate() calls (again)

2020-10-09 Thread Jens Freimann
On Fri, Oct 09, 2020 at 08:48:57AM +0200, Markus Armbruster wrote: Patch created mechanically by rerunning: $ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \ --macro-file scripts/cocci-macro-file.h \ --use-gitgrep . Cc: Jens Freimann Cc: Hailiang

Re: [PATCH] virtiofsd: avoid /proc/self/fd tempdir

2020-10-06 Thread Jens Freimann
, "..", O_PATH | O_DIRECTORY | O_NOFOLLOW); level++; } } Before and after this patch only Level 0 is displayed. Without /proc/self/fd bind-mount protection it is possible to traverse parent directories. Fixes: 397ae982f4df4 ("virtiofsd: jail lo->proc_self_fd") Cc: M

Re: [RFC 0/1] tools/virtiofsd: don't create temporary directory in /

2020-10-05 Thread Jens Freimann
On Thu, Oct 01, 2020 at 08:15:18AM +0200, Jens Freimann wrote: I'm sending this as an RFC because: Maybe just prepending "/tmp" is not generic enough and we should make it somehow configurable or use $TMPDIR. Also there might be security implications I'm not aware of. The process

[RFC 0/1] tools/virtiofsd: don't create temporary directory in /

2020-10-01 Thread Jens Freimann
IR. Also there might be security implications I'm not aware of. The process is running with container_kvm_t context which also needs a change to be allowed to create files in tmpfs to make it work. Jens Freimann (1): tools/virtiofsd: create tmpdir in /tmp tools/virtiofsd/passthrough_ll.c |

[RFC 1/1] tools/virtiofsd: create temporary directory in /tmp

2020-10-01 Thread Jens Freimann
e. Signed-off-by: Jens Freimann --- tools/virtiofsd/passthrough_ll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 0b229ebd57..f79bcce0d7 100644 --- a/tools/virtiofsd/passthrough_ll.c +++ b/tools

Re: [PATCH 02/22] pci: Delete useless error_propagate()

2020-06-22 Thread Jens Freimann
On Mon, Jun 22, 2020 at 12:42:30PM +0200, Markus Armbruster wrote: Cc: Jens Freimann Cc: Michael S. Tsirkin Cc: Marcel Apfelbaum Signed-off-by: Markus Armbruster --- hw/pci/pci.c | 3 --- 1 file changed, 3 deletions(-) Reviewed-by: Jens Freimann Thanks! regards, Jens

Re: [PATCH 01/22] net/virtio: Fix failover_replug_primary() return value regression

2020-06-22 Thread Jens Freimann
quot; broke it again for hotplug_handler_plug() failure. Unbreak it. Commit 5a0948d36c4cbc1c5534afac6fee99de55245d12 Fixes: 5a0948d36c4cbc1c5534afac6fee99de55245d12 Cc: Jens Freimann Cc: Michael S. Tsirkin Cc: qemu-sta...@nongnu.org Signed-off-by: Markus Armbruster --- hw/net/virtio-net.c | 2 +- 1 file change

Re: [PATCH] migration: Optimization about wait-unplug migration state

2020-02-05 Thread Jens Freimann
mu_savevm_state_header(QEMUFile *f); -- 2.19.1 Looks good to me. I tested it and it still works, so Tested-by: Jens Freimann Reviewed-by: Jens Freimann regards Jens

Re: qom device lifecycle interaction with hotplug/hotunplug ?

2019-12-18 Thread Jens Freimann
On Wed, Dec 11, 2019 at 01:52:33PM +0100, Damien Hedde wrote: On 12/4/19 7:51 PM, Eduardo Habkost wrote: On Wed, Dec 04, 2019 at 05:21:25PM +0100, Jens Freimann wrote: On Wed, Dec 04, 2019 at 11:35:37AM -0300, Eduardo Habkost wrote: On Wed, Dec 04, 2019 at 10:18:24AM +0100, Jens Freimann

Re: qom device lifecycle interaction with hotplug/hotunplug ?

2019-12-04 Thread Jens Freimann
On Wed, Dec 04, 2019 at 11:35:37AM -0300, Eduardo Habkost wrote: On Wed, Dec 04, 2019 at 10:18:24AM +0100, Jens Freimann wrote: On Tue, Dec 03, 2019 at 06:40:04PM -0300, Eduardo Habkost wrote: > +jfreimann, +mst > > On Sat, Nov 30, 2019 at 11:10:19AM +, Peter Maydell wrote: >

Re: qom device lifecycle interaction with hotplug/hotunplug ?

2019-12-04 Thread Jens Freimann
On Tue, Dec 03, 2019 at 06:40:04PM -0300, Eduardo Habkost wrote: +jfreimann, +mst On Sat, Nov 30, 2019 at 11:10:19AM +, Peter Maydell wrote: On Fri, 29 Nov 2019 at 20:05, Eduardo Habkost wrote: > So, to summarize the current issues: > > 1) realize triggers a plug operation implicitly. >

Re: [PATCH 00/21] Error handling fixes, may contain 4.2 material

2019-12-02 Thread Jens Freimann
On Sat, Nov 30, 2019 at 08:42:19PM +0100, Markus Armbruster wrote: PATCH 2-4 fix crash bugs. Including them would be a no-brainer at -rc0. But we're post -rc3, and even for crash bugs we require a certain likelihood of users getting bitten. Jens, please assess impact of PATCH 2's crash bug.

Re: [PATCH 01/21] net/virtio: Drop useless n->primary_dev not null checks

2019-12-02 Thread Jens Freimann
tering failover_replug_primary(), @pdev will become null, and pdev->partially_hotplugged will crash. Checking n->primary_dev later is useless. It can't actually be null, because its caller virtio_net_handle_migration_primary() ensures it isn't. Drop the useless check. Cc: Jens Freimann Cc: Michael S. Tsirkin

Re: [PATCH 02/21] net/virtio: Fix failover error handling crash bugs

2019-12-02 Thread Jens Freimann
each error properly. failover_replug_primary() crashes when passed a null @errp. Also messed up in commit 9711cd0dfc. This bug can't bite as no caller actually passes null. Fix it anyway. Fixes: 9711cd0dfc3fa414f7f64935713c07134ae67971 Fixes: 150ab54aa6934583180f88a2bd540bc6fc4fbff3 Cc: Jens Freimann Cc: Michael S.

Re: [PULL 0/5] i386 patches for QEMU 4.2-rc

2019-11-28 Thread Jens Freimann
On Wed, Nov 27, 2019 at 09:14:01AM +, Dr. David Alan Gilbert wrote: * Philippe Mathieu-Daudé (phi...@redhat.com) wrote: On 11/26/19 10:19 AM, no-re...@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/20191126085936.1689-1-pbonz...@redhat.com/ > > This series failed the

Re: [PULL 0/5] i386 patches for QEMU 4.2-rc

2019-11-27 Thread Jens Freimann
On Wed, Nov 27, 2019 at 09:14:01AM +, Dr. David Alan Gilbert wrote: * Philippe Mathieu-Daudé (phi...@redhat.com) wrote: On 11/26/19 10:19 AM, no-re...@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/20191126085936.1689-1-pbonz...@redhat.com/ > > This series failed the

[PATCH v3 2/4] net/virtio: return early when failover primary alread added

2019-11-20 Thread Jens Freimann
Bail out when primary device was already added before. This avoids printing a wrong warning message during reboot. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann Reviewed-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 4 1 file

[PATCH v3 3/4] net/virtio: fix re-plugging of primary device

2019-11-20 Thread Jens Freimann
NULL to qdev_set_parent_bus(). This fixes CID 1407224. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann Reviewed-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 42 +- 1 file changed, 25 insertions(+), 17

[PATCH v3 1/4] net/virtio: fix dev_unplug_pending

2019-11-20 Thread Jens Freimann
was set. When the feature was not negotiated dev_unplug_pending() will always return false. This prevents us from going into the wait-unplug state when there's no primary device present. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann Reported-by:

[PATCH v3 4/4] net/virtio: return error when device_opts arg is NULL

2019-11-20 Thread Jens Freimann
This fixes CID 1407222. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann Reviewed-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-n

[PATCH v3 0/4] net/virtio: fixes for failover

2019-11-20 Thread Jens Freimann
This series fixes bugs found by coverity and one reported by David Gilbert. v2->v3: * change patch description and subject of patch 3/4 Jens Freimann (4): net/virtio: fix dev_unplug_pending net/virtio: return early when failover primary alread added net/virtio: fix re-plugging of prim

Re: [PATCH v2 3/4] net/virtio: avoid passing NULL to qdev_set_parent_bus

2019-11-20 Thread Jens Freimann
On Wed, Nov 20, 2019 at 10:04:01AM -0500, Michael S. Tsirkin wrote: On Wed, Nov 20, 2019 at 03:38:58PM +0100, Jens Freimann wrote: Make sure we don't pass NULL to qdev_set_parent_bus(). Also simplify code a bit and fix a typo. This fixes CID 1407224. Fixes: 9711cd0dfc3f ("net/virtio

[PATCH v2 3/4] net/virtio: avoid passing NULL to qdev_set_parent_bus

2019-11-20 Thread Jens Freimann
Make sure we don't pass NULL to qdev_set_parent_bus(). Also simplify code a bit and fix a typo. This fixes CID 1407224. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann --- hw/net/virtio-net.c | 42 +- 1 fi

[PATCH v2 0/4] net/virtio: fixes for failover

2019-11-20 Thread Jens Freimann
This series fixes bugs found by coverity and one reported by David Gilbert. Jens Freimann (4): net/virtio: fix dev_unplug_pending net/virtio: return early when failover primary alread added net/virtio: avoid passing NULL to qdev_set_parent_bus net/virtio: return error when device_opts arg

[PATCH v2 4/4] net/virtio: return error when device_opts arg is NULL

2019-11-20 Thread Jens Freimann
This fixes CID 1407222. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann Reviewed-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-n

[PATCH v2 2/4] net/virtio: return early when failover primary alread added

2019-11-20 Thread Jens Freimann
Bail out when primary device was already added before. This avoids printing a wrong warning message during reboot. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann Reviewed-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 4 1 file

[PATCH v2 1/4] net/virtio: fix dev_unplug_pending

2019-11-20 Thread Jens Freimann
was set. When the feature was not negotiated dev_unplug_pending() will always return false. This prevents us from going into the wait-unplug state when there's no primary device present. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann Reported-by:

Re: [PATCH 3/4] net/virtio: avoid passing NULL to qdev_set_parent_bus

2019-11-20 Thread Jens Freimann
On Wed, Nov 20, 2019 at 05:46:36AM -0500, Michael S. Tsirkin wrote: On Thu, Nov 14, 2019 at 03:16:12PM +0100, Jens Freimann wrote: Make sure no arguments for qdev_set_parent_bus are NULL. This fixes CID 1407224. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-of

[PATCH 3/4] net/virtio: avoid passing NULL to qdev_set_parent_bus

2019-11-14 Thread Jens Freimann
Make sure no arguments for qdev_set_parent_bus are NULL. This fixes CID 1407224. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann --- hw/net/virtio-net.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/net/vi

[PATCH 4/4] net/virtio: return error when device_opts arg is NULL

2019-11-14 Thread Jens Freimann
device_opts could be NULL. Make sure we don't pass it to qemu_opts_to_dict. When we made sure it can't be NULL we can also remove it from the if condition. This fixes CID 1407222. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann --- hw/net/virtio

[PATCH 2/4] net/virtio: return early when failover primary alread added

2019-11-14 Thread Jens Freimann
Bail out when primary device was already added before. This avoids printing a wrong warning message during reboot. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann --- hw/net/virtio-net.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/

[PATCH 1/4] net/virtio: fix dev_unplug_pending

2019-11-14 Thread Jens Freimann
pointer was set. When the feature was not negotiated dev_unplug_pending() will always return false. This prevents us from going into the wait-unplug state when there's no primary device present. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann Reported-by:

[PATCH] vfio: don't ignore return value of migrate_add_blocker

2019-11-14 Thread Jens Freimann
: f045a0104c8c ("vfio: unplug failover primary device before migration") Signed-off-by: Jens Freimann --- hw/vfio/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index e6569a7968..ed01774673 100644 --- a/hw/vfio/pci.c +++ b/hw/

Re: [PATCH] tests/migration: Print some debug on bad status

2019-11-11 Thread Jens Freimann
On Fri, Nov 08, 2019 at 06:38:17PM +, Dr. David Alan Gilbert wrote: Hi Jens, the unplug failover stuff is triggering an assertion occasionally on aarch64; but a) I'm not sure the right way to fix it b) And I'm out for a little over a week so... I'll take care of it. *

Re: [PATCH v6 06/11] qapi: add failover negotiated event

2019-10-30 Thread Jens Freimann
On Tue, Oct 29, 2019 at 06:41:58PM -0400, Michael S. Tsirkin wrote: On Fri, Oct 25, 2019 at 07:39:21PM +0200, Jens Freimann wrote: On Fri, Oct 25, 2019 at 04:03:54PM +0200, Markus Armbruster wrote: > Bear with me, I know next to nothing about failover. > > Jens Freiman

Re: [PATCH v7 05/11] qapi: add unplug primary event

2019-10-29 Thread Jens Freimann
On Tue, Oct 29, 2019 at 01:50:02PM +0100, Markus Armbruster wrote: Jens Freimann writes: This event is emitted when we sent a request to unplug a Uh, "we sent a requestion [...] from the Guest OS"... do you mean "we received"? No, we sent a pci hotplug event to t

[PATCH v7 11/11] vfio: unplug failover primary device before migration

2019-10-29 Thread Jens Freimann
by the migration handler of the corresponding virtio-net standby device. Signed-off-by: Jens Freimann Acked-by: Alex Williamson --- hw/vfio/pci.c | 26 -- hw/vfio/pci.h | 1 + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c

[PATCH v7 09/11] libqos: tolerate wait-unplug migration state

2019-10-29 Thread Jens Freimann
Signed-off-by: Jens Freimann --- tests/libqos/libqos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/libqos/libqos.c b/tests/libqos/libqos.c index d71557c5cb..f229eb2cb8 100644 --- a/tests/libqos/libqos.c +++ b/tests/libqos/libqos.c @@ -125,7 +125,8 @@ void migrate

[PATCH v7 08/11] migration: add new migration state wait-unplug

2019-10-29 Thread Jens Freimann
the user will see the migration state 'wait-unplug'. In the migration thread we query failover devices if they're are still pending the guest unplug. When all are unplugged the migration continues. If one device won't unplug migration will stay in wait_unplug state. Signed-off-by: Jens Freimann

[PATCH v7 06/11] qapi: add failover negotiated event

2019-10-29 Thread Jens Freimann
This event is sent to let libvirt know that VIRTIO_NET_F_STANDBY feature is enabled. The primary device this virtio-net (standby) device is associated with, is now hotplugged by the virtio-net device. Signed-off-by: Jens Freimann --- qapi/net.json | 19 +++ 1 file changed, 19

[PATCH v7 05/11] qapi: add unplug primary event

2019-10-29 Thread Jens Freimann
This event is emitted when we sent a request to unplug a failover primary device from the Guest OS and it includes the device id of the primary device. Signed-off-by: Jens Freimann --- qapi/migration.json | 19 +++ 1 file changed, 19 insertions(+) diff --git a/qapi

[PATCH v7 10/11] net/virtio: add failover support

2019-10-29 Thread Jens Freimann
the guest. Signed-off-by: Jens Freimann --- MAINTAINERS| 1 + docs/virtio-net-failover.rst | 68 hw/net/virtio-net.c| 302 + include/hw/virtio/virtio-net.h | 12 ++ include/hw/virtio/virtio.h | 1 + 5 files changed

[PATCH v7 04/11] pci: mark device having guest unplug request pending

2019-10-29 Thread Jens Freimann
Set pending_deleted_event in DeviceState for failover primary devices that were successfully unplugged by the Guest OS. Signed-off-by: Jens Freimann --- hw/pci/pcie.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 19363ff8ce..08718188bb 100644

[PATCH v7 03/11] pci: mark devices partially unplugged

2019-10-29 Thread Jens Freimann
Only the guest unplug request was triggered. This is needed for the failover feature. In case of a failed migration we need to plug the device back to the guest. Signed-off-by: Jens Freimann --- hw/pci/pcie.c| 3 +++ include/hw/pci/pci.h | 1 + 2 files changed, 4 insertions(+) diff

[PATCH v7 07/11] migration: allow unplug during migration for failover devices

2019-10-29 Thread Jens Freimann
eviceState which is set to false for all devices and makes an exception for PCI devices that are also primary devices in a failover pair. Signed-off-by: Jens Freimann --- hw/core/qdev.c | 1 + hw/pci/pci.c | 1 + include/hw/qdev-core.h | 1 + qdev-monitor.c | 2 +- 4 fil

[PATCH v7 02/11] pci: add option for net failover

2019-10-29 Thread Jens Freimann
support other hotplug controllers at the moment. The failover functionality can be added to other hotplug controllers like ACPI, SHCP,... later on. Signed-off-by: Jens Freimann --- hw/pci/pci.c | 31 +++ include/hw/pci/pci.h | 3 +++ 2 files changed, 34

[PATCH v7 0/11] add failover feature for assigned network devices

2019-10-29 Thread Jens Freimann
net1,id=net1,mac=52:54:00:6f:55:cc,bus=root2,failover=on \ -device vfio-pci,host=5e:00.2,id=hostdev0,bus=root1,failover_pair_id =net1 \ /root/rhel-guest-image-8.0-1781.x86_64.qcow2 I'm grateful for any remarks or ideas! Thanks! regards, Jens Jens Freimann (11): qdev/qbus

[PATCH v7 01/11] qdev/qbus: add hidden device support

2019-10-29 Thread Jens Freimann
io-net-pci,...,failover=on,... -device vfio-pci,...,failover_pair_id=net1,... Signed-off-by: Jens Freimann --- hw/core/qdev.c | 24 include/hw/qdev-core.h | 29 + qdev-monitor.c | 41 +

Re: [PATCH v6 0/11] add failover feature for assigned network devices

2019-10-29 Thread Jens Freimann
On Mon, Oct 28, 2019 at 11:58:53AM -0400, Michael S. Tsirkin wrote: I see at least comments from Markus. You answered but don't you need to also tweak the patch? That comment was addressed already IMO, but I'll change the patch description as well and while I'm at it will also fix David's

Re: [PATCH v6 08/11] migration: add new migration state wait-unplug

2019-10-28 Thread Jens Freimann
Dr. David Alan Gilbert schrieb am Di., 29. Okt. 2019, 03:57: > * Jens Freimann (jfreim...@redhat.com) wrote: > > This patch adds a new migration state called wait-unplug. It is entered > > after the SETUP state if failover devices are present. It will transition > > into AC

Re: [PATCH v6 0/11] add failover feature for assigned network devices

2019-10-28 Thread Jens Freimann
Hi Michael, I addressed all comments and feedback and think this can be merged but I'm unclear about which tree it should go to. Will you merge it into the virtio-tree? regards, Jens On Fri, Oct 25, 2019 at 02:19:19PM +0200, Jens Freimann wrote: This is implementing the host side

Re: [PATCH v6 06/11] qapi: add failover negotiated event

2019-10-25 Thread Jens Freimann
On Fri, Oct 25, 2019 at 04:03:54PM +0200, Markus Armbruster wrote: Bear with me, I know next to nothing about failover. Jens Freimann writes: This event is sent to let libvirt know that VIRTIO_NET_F_STANDBY feature was enabled. The primary device this virtio-net device is associated

[PATCH v6 11/11] vfio: unplug failover primary device before migration

2019-10-25 Thread Jens Freimann
by the migration handler of the corresponding virtio-net standby device. Signed-off-by: Jens Freimann Acked-by: Alex Williamson Acked-by: Cornelia Huck --- hw/vfio/pci.c | 26 -- hw/vfio/pci.h | 1 + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/hw/vfio

[PATCH v6 10/11] net/virtio: add failover support

2019-10-25 Thread Jens Freimann
the guest. Signed-off-by: Jens Freimann Acked-by: Cornelia Huck --- MAINTAINERS| 1 + docs/virtio-net-failover.rst | 68 hw/net/virtio-net.c| 302 + include/hw/virtio/virtio-net.h | 12 ++ include/hw/virtio/virtio.h

[PATCH v6 09/11] libqos: tolerate wait-unplug migration state

2019-10-25 Thread Jens Freimann
Signed-off-by: Jens Freimann Acked-by: Cornelia Huck --- tests/libqos/libqos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/libqos/libqos.c b/tests/libqos/libqos.c index d71557c5cb..f229eb2cb8 100644 --- a/tests/libqos/libqos.c +++ b/tests/libqos/libqos.c

[PATCH v6 05/11] qapi: add unplug primary event

2019-10-25 Thread Jens Freimann
This event is emitted when we sent a request to unplug a failover primary device from the Guest OS and it includes the device id of the primary device. Signed-off-by: Jens Freimann Acked-by: Cornelia Huck --- qapi/migration.json | 19 +++ 1 file changed, 19 insertions(+) diff

[PATCH v6 08/11] migration: add new migration state wait-unplug

2019-10-25 Thread Jens Freimann
the user will see the migration state 'wait-unplug'. In the migration thread we query failover devices if they're are still pending the guest unplug. When all are unplugged the migration continues. If one device won't unplug migration will stay in wait_unplug state. Signed-off-by: Jens Freimann Acked

[PATCH v6 07/11] migration: allow unplug during migration for failover devices

2019-10-25 Thread Jens Freimann
eviceState which is set to false for all devices and makes an exception for PCI devices that are also primary devices in a failover pair. Signed-off-by: Jens Freimann Acked-by: Cornelia Huck --- hw/core/qdev.c | 1 + hw/pci/pci.c | 1 + include/hw/qdev-core.h | 1 + qdev

[PATCH v6 03/11] pci: mark devices partially unplugged

2019-10-25 Thread Jens Freimann
Only the guest unplug request was triggered. This is needed for the failover feature. In case of a failed migration we need to plug the device back to the guest. Signed-off-by: Jens Freimann Acked-by: Cornelia Huck --- hw/pci/pcie.c| 3 +++ include/hw/pci/pci.h | 1 + 2 files changed

[PATCH v6 01/11] qdev/qbus: add hidden device support

2019-10-25 Thread Jens Freimann
io-net-pci,...,failover=on,... -device vfio-pci,...,failover_pair_id=net1,... Signed-off-by: Jens Freimann Reviewed-by: Cornelia Huck --- hw/core/qdev.c | 24 include/hw/qdev-core.h | 29 + qdev-monitor.c

[PATCH v6 06/11] qapi: add failover negotiated event

2019-10-25 Thread Jens Freimann
This event is sent to let libvirt know that VIRTIO_NET_F_STANDBY feature was enabled. The primary device this virtio-net device is associated with, will now be hotplugged via qdev_device_add(). Signed-off-by: Jens Freimann Acked-by: Cornelia Huck --- qapi/net.json | 19 +++ 1

[PATCH v6 04/11] pci: mark device having guest unplug request pending

2019-10-25 Thread Jens Freimann
Set pending_deleted_event in DeviceState for failover primary devices that were successfully unplugged by the Guest OS. Signed-off-by: Jens Freimann Acked-by: Cornelia Huck --- hw/pci/pcie.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 19363ff8ce

[PATCH v6 02/11] pci: add option for net failover

2019-10-25 Thread Jens Freimann
support other hotplug controllers at the moment. The failover functionality can be added to other hotplug controllers like ACPI, SHCP,... later on. Signed-off-by: Jens Freimann Acked-by: Cornelia Huck --- hw/pci/pci.c | 31 +++ include/hw/pci/pci.h | 3 +++ 2

[PATCH v6 0/11] add failover feature for assigned network devices

2019-10-25 Thread Jens Freimann
ailover_pair_id =net1 \ /root/rhel-guest-image-8.0-1781.x86_64.qcow2 I'm grateful for any remarks or ideas! Thanks! regards, Jens Jens Freimann (11): qdev/qbus: add hidden device support pci: add option for net failover pci: mark devices partially unplugged pci: mark devi

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-25 Thread Jens Freimann
On Wed, Oct 23, 2019 at 12:06:48PM -0600, Alex Williamson wrote: On Wed, 23 Oct 2019 10:27:02 +0200 Jens Freimann wrote: [...] @@ -2101,6 +2104,20 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp) } } +if (pci_dev->net_failover_pair

Re: [PATCH v5 06/11] qapi: add failover negotiated event

2019-10-25 Thread Jens Freimann
matter experts to be fluent in the QAPI schema language and conventions. I found this one more or less by chance. Sorry about that, I'll make sure to get the right people next time. Jens Freimann writes: This event is sent to let libvirt know that VIRTIO_NET_F_STANDBY feature

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-24 Thread Jens Freimann
On Thu, Oct 24, 2019 at 10:52:36AM -0600, Alex Williamson wrote: On Thu, 24 Oct 2019 11:37:54 +0200 Jens Freimann wrote: [...] > >While reviewing, I realized that we shouldn't have this check for below reasons. > >1. It is user's responsibility to pass networking device.

Re: [PATCH v5 06/11] qapi: add failover negotiated event

2019-10-24 Thread Jens Freimann
On Thu, Oct 24, 2019 at 06:32:45PM +0100, Dr. David Alan Gilbert wrote: * Jens Freimann (jfreim...@redhat.com) wrote: This event is sent to let libvirt know that VIRTIO_NET_F_STANDBY feature was not negotiated during virtio feature negotiation. If this event is received it means any primary

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-24 Thread Jens Freimann
On Thu, Oct 24, 2019 at 06:22:27PM +0100, Dr. David Alan Gilbert wrote: * Jens Freimann (jfreim...@redhat.com) wrote: This patch adds a net_failover_pair_id property to PCIDev which is used to link the primary device in a failover pair (the PCI dev) to a standby (a virtio-net-pci) device

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-24 Thread Jens Freimann
On Thu, Oct 24, 2019 at 05:03:46AM +, Parav Pandit wrote: @@ -2101,6 +2104,20 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp) } } +if (pci_dev->net_failover_pair_id) { +if (!pci_is_express(pci_dev)) { I am testing and integrating this piece with

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-23 Thread Jens Freimann
On Wed, Oct 23, 2019 at 02:02:11PM -0600, Alex Williamson wrote: On Wed, 23 Oct 2019 21:30:35 +0200 Jens Freimann wrote: On Wed, Oct 23, 2019 at 12:06:48PM -0600, Alex Williamson wrote: >On Wed, 23 Oct 2019 10:27:02 +0200 >Jens Freimann wrote: [...] >Are there also multi

Re: [PATCH v5 02/11] pci: add option for net failover

2019-10-23 Thread Jens Freimann
On Wed, Oct 23, 2019 at 12:06:48PM -0600, Alex Williamson wrote: On Wed, 23 Oct 2019 10:27:02 +0200 Jens Freimann wrote: This patch adds a net_failover_pair_id property to PCIDev which is used to link the primary device in a failover pair (the PCI dev) to a standby (a virtio-net-pci) device

[PATCH v5 11/11] vfio: unplug failover primary device before migration

2019-10-23 Thread Jens Freimann
by the migration handler of the corresponding virtio-net standby device. Signed-off-by: Jens Freimann --- hw/vfio/pci.c | 26 -- hw/vfio/pci.h | 1 + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 12fac39804..5dadfec6e8

[PATCH v5 08/11] migration: add new migration state wait-unplug

2019-10-23 Thread Jens Freimann
the user will see the migration state 'wait-unplug'. In the migration thread we query failover devices if they're are still pending the guest unplug. When all are unplugged the migration continues. If one device won't unplug migration will stay in wait_unplug state. Signed-off-by: Jens Freimann

[PATCH v5 10/11] net/virtio: add failover support

2019-10-23 Thread Jens Freimann
its primary device before the migration happens. 3. Register a callback for the migration code that checks if a device needs to be unplugged from the guest. Signed-off-by: Jens Freimann --- hw/net/virtio-net.c| 302 + include/hw/virtio/virtio-net.h

[PATCH v5 05/11] qapi: add unplug primary event

2019-10-23 Thread Jens Freimann
This event is emitted when we sent a request to unplug a failover primary device from the Guest OS and it includes the device id of the primary device. Signed-off-by: Jens Freimann --- qapi/migration.json | 19 +++ 1 file changed, 19 insertions(+) diff --git a/qapi

[PATCH v5 06/11] qapi: add failover negotiated event

2019-10-23 Thread Jens Freimann
This event is sent to let libvirt know that VIRTIO_NET_F_STANDBY feature was not negotiated during virtio feature negotiation. If this event is received it means any primary devices hotplugged before this were were never really added to QEMU devices. Signed-off-by: Jens Freimann --- qapi

[PATCH v5 09/11] libqos: tolerate wait-unplug migration state

2019-10-23 Thread Jens Freimann
Signed-off-by: Jens Freimann --- tests/libqos/libqos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/libqos/libqos.c b/tests/libqos/libqos.c index d71557c5cb..f229eb2cb8 100644 --- a/tests/libqos/libqos.c +++ b/tests/libqos/libqos.c @@ -125,7 +125,8 @@ void migrate

[PATCH v5 02/11] pci: add option for net failover

2019-10-23 Thread Jens Freimann
otherwise. Signed-off-by: Jens Freimann --- hw/pci/pci.c | 17 + include/hw/pci/pci.h | 3 +++ 2 files changed, 20 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index aa05c2b9b2..fa9b5219f8 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -75,6 +75,8 @@ static Property

[PATCH v5 04/11] pci: mark device having guest unplug request pending

2019-10-23 Thread Jens Freimann
Set pending_deleted_event in DeviceState for failover primary devices that were successfully unplugged by the Guest OS. Signed-off-by: Jens Freimann --- hw/pci/pcie.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 19363ff8ce..08718188bb 100644

[PATCH v5 07/11] migration: allow unplug during migration for failover devices

2019-10-23 Thread Jens Freimann
eviceState which is set to false for all devices and makes an exception for PCI devices that are also primary devices in a failover pair. Signed-off-by: Jens Freimann --- hw/core/qdev.c | 1 + hw/pci/pci.c | 1 + include/hw/qdev-core.h | 1 + qdev-monitor.c | 2 +- 4 fil

[PATCH v5 03/11] pci: mark devices partially unplugged

2019-10-23 Thread Jens Freimann
Only the guest unplug request was triggered. This is needed for the failover feature. In case of a failed migration we need to plug the device back to the guest. Signed-off-by: Jens Freimann --- hw/pci/pcie.c| 3 +++ include/hw/pci/pci.h | 1 + 2 files changed, 4 insertions(+) diff

[PATCH v5 0/11] add failover feature for assigned network devices

2019-10-23 Thread Jens Freimann
vice virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:6f:55:cc,bus=root2,failover=on \ -device vfio-pci,host=5e:00.2,id=hostdev0,bus=root1,net_failover_pair_id =net1 \ /root/rhel-guest-image-8.0-1781.x86_64.qcow2 I'm grateful for any remarks or ideas! Thanks! regards,

[PATCH v5 01/11] qdev/qbus: add hidden device support

2019-10-23 Thread Jens Freimann
io-net-pci,...,failover=on,... -device vfio-pci,...,net_failover_pair_id=net1,... Signed-off-by: Jens Freimann Reviewed-by: Cornelia Huck --- hw/core/qdev.c | 23 +++ include/hw/qdev-core.h | 29 + qdev-monitor.c

Re: [PATCH 02/11] pci: add option for net failover

2019-10-21 Thread Jens Freimann
On Mon, Oct 21, 2019 at 01:01:22PM -0600, Alex Williamson wrote: On Mon, 21 Oct 2019 20:45:46 +0200 Jens Freimann wrote: On Mon, Oct 21, 2019 at 08:58:23AM -0600, Alex Williamson wrote: >On Fri, 18 Oct 2019 22:20:31 +0200 >Jens Freimann wrote: > >> This patch adds a net_f

Re: [PATCH 11/11] vfio: unplug failover primary device before migration

2019-10-21 Thread Jens Freimann
On Mon, Oct 21, 2019 at 09:19:20AM -0600, Alex Williamson wrote: On Fri, 18 Oct 2019 22:20:40 +0200 Jens Freimann wrote: [...] +if (!pdev->net_failover_pair_id) { +error_setg(>migration_blocker, +"VFIO device doesn't support migration"

Re: [PATCH 02/11] pci: add option for net failover

2019-10-21 Thread Jens Freimann
On Mon, Oct 21, 2019 at 08:58:23AM -0600, Alex Williamson wrote: On Fri, 18 Oct 2019 22:20:31 +0200 Jens Freimann wrote: This patch adds a net_failover_pair_id property to PCIDev which is used to link the primary device in a failover pair (the PCI dev) to a standby (a virtio-net-pci) device

Re: [PATCH 11/11] vfio: unplug failover primary device before migration

2019-10-21 Thread Jens Freimann
On Mon, Oct 21, 2019 at 03:45:04PM +0200, Cornelia Huck wrote: On Fri, 18 Oct 2019 22:20:40 +0200 Jens Freimann wrote: As usual block all vfio-pci devices from being migrated, but make an exception for failover primary devices. This is achieved by setting unmigratable to 0 but also add

Re: [PATCH 01/11] qdev/qbus: add hidden device support

2019-10-21 Thread Jens Freimann
On Mon, Oct 21, 2019 at 01:53:58PM +0100, Peter Maydell wrote: On Fri, 18 Oct 2019 at 21:22, Jens Freimann wrote: This adds support for hiding a device to the qbus and qdev APIs. The first user of this will be the virtio-net failover feature but the API introduced with this patch could

Re: [PATCH 01/11] qdev/qbus: add hidden device support

2019-10-21 Thread Jens Freimann
On Mon, Oct 21, 2019 at 02:44:08PM +0200, Cornelia Huck wrote: On Fri, 18 Oct 2019 22:20:30 +0200 Jens Freimann wrote: This adds support for hiding a device to the qbus and qdev APIs. The first user of this will be the virtio-net failover feature but the API introduced with this patch could

Re: [PATCH v4 0/11] add failover feature for assigned network devices

2019-10-21 Thread Jens Freimann
On Sat, Oct 19, 2019 at 08:12:27AM -0700, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20191018202040.30349-1-jfreim...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker

Re: [PATCH 05/11] qapi: add unplug primary event

2019-10-21 Thread Jens Freimann
On Fri, Oct 18, 2019 at 03:28:36PM -0500, Eric Blake wrote: On 10/18/19 3:20 PM, Jens Freimann wrote: This event is emitted when we sent a request to unplug a failover primary device from the Guest OS and it includes the device id of the primary device. Signed-off-by: Jens Freimann --- qapi

[PATCH 07/11] migration: allow unplug during migration for failover devices

2019-10-18 Thread Jens Freimann
eviceState which is set to false for all devices and makes an exception for vfio-pci devices that are also primary devices in a failover pair. Signed-off-by: Jens Freimann --- hw/core/qdev.c | 1 + include/hw/qdev-core.h | 1 + qdev-monitor.c | 2 +- 3 files changed, 3 insert

[PATCH 10/11] net/virtio: add failover support

2019-10-18 Thread Jens Freimann
its primary device before the migration happens. 3. Register a callback for the migration code that checks if a device needs to be unplugged from the guest. Signed-off-by: Jens Freimann --- hw/net/virtio-net.c| 282 + include/hw/virtio/virtio-net.h

[PATCH 11/11] vfio: unplug failover primary device before migration

2019-10-18 Thread Jens Freimann
by the migration handler of the corresponding virtio-net standby device. Signed-off-by: Jens Freimann --- hw/vfio/pci.c | 31 +-- hw/vfio/pci.h | 1 + 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 12fac39804

[PATCH 04/11] pci: mark device having guest unplug request pending

2019-10-18 Thread Jens Freimann
Set pending_deleted_event in DeviceState for failover primary devices that were successfully unplugged by the Guest OS. Signed-off-by: Jens Freimann --- hw/pci/pcie.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 19363ff8ce..08718188bb 100644

  1   2   3   4   5   >