Re: [PATCH v4 2/2] virtio-net: prevent offloads reset on migration

2019-10-24 Thread Mikhail Sennikovsky
On Fri, Oct 11, 2019 at 03:58:04PM +0200, Mikhail Sennikovsky wrote: > > Currently offloads disabled by guest via the > > VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET > > command are not preserved on VM migration. > > Instead all offloads reported by guest features (via > > VIRTIO

[PATCH v4 2/2] virtio-net: prevent offloads reset on migration

2019-10-11 Thread Mikhail Sennikovsky
igned-off-by: Mikhail Sennikovsky --- hw/net/virtio-net.c| 27 --- include/hw/virtio/virtio-net.h | 2 ++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index b9e1cd7..6adb0fe 100644 --- a/hw/net/virtio

[PATCH v4 1/2] virtio: new post_load hook

2019-10-11 Thread Mikhail Sennikovsky
ok in a device class instead. Devices should use this unless they specifically want to verify the migration stream as it's processed, e.g. for bounds checking. Suggested-by: "Dr. David Alan Gilbert" Cc: Mikhail Sennikovsky Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio.c

Re: [RFC 2/2] virtio-net: use post load hook

2019-10-11 Thread Mikhail Sennikovsky
I still wonder though if this approach is really cleaner than my original one of having an extra argument in set_features callback, saying whether the device settings (offloads in case of virtio-net) need to be reset. Mikhail Am Fr., 11. Okt. 2019 um 12:30 Uhr schrieb Mikhail Sennikovsky

Re: [RFC 2/2] virtio-net: use post load hook

2019-10-11 Thread Mikhail Sennikovsky
n); in the new post load hook (virtio_net_post_load_virtio) exactly like you say? Mikhail > > > On Fri, Oct 11, 2019 at 11:58:38AM +0200, Mikhail Sennikovsky wrote: > > Note that the virtio_net_set_features gets also called from the > > virtio_pci_common_write when guest does

Re: [RFC 2/2] virtio-net: use post load hook

2019-10-11 Thread Mikhail Sennikovsky
Oct 11, 2019 at 11:46:22AM +0200, Mikhail Sennikovsky wrote: > > Hi Michael, > > > > Unfortunately your approach will not work, because the > > VirtIONet::curr_guest_offloads would still be reset in > > virtio_net_set_features: > > -- > > if (n

Re: [RFC 2/2] virtio-net: use post load hook

2019-10-11 Thread Mikhail Sennikovsky
69eee20) at > migration/savevm.c:2395 > #10 qemu_loadvm_state (f=0x569dc010) at migration/savevm.c:2467 > #11 process_incoming_migration_co (opaque=0x0) at migration/migration.c:449 > > Fix this by pushing out offload initialization to the new post load hook. > > Repo

[PATCH v3] virtio-net: prevent offloads reset on migration

2019-10-10 Thread Mikhail Sennikovsky
igned-off-by: Mikhail Sennikovsky --- hw/net/virtio-net.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index b9e1cd7..49be172 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -767,7 +767,14 @@

Re: [PATCH] virtio-net: prevent offloads reset on migration

2019-10-10 Thread Mikhail Sennikovsky
in Stefan, Jason and Michael who know the virtio details > > > > Dave > > > > * Mikhail Sennikovsky (mikhail.sennikovs...@cloud.ionos.com) wrote: > >> Currently offloads disabled by guest via the > >> VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET > >> command a

[PATCH v3] virtio-net: prevent offloads reset on migration

2019-10-10 Thread Mikhail Sennikovsky
Hi all, This is the third version of the patch, implementing the approach based on checking the VM runstate proposed by Jason Wang. Regards, Mikhail Mikhail Sennikovsky (1): virtio-net: prevent offloads reset on migration hw/net/virtio-net.c | 9 - 1 file changed, 8 insertions(+), 1

Re: [PATCH] virtio-net: prevent offloads reset on migration

2019-10-07 Thread Mikhail Sennikovsky
t; > Dave > > * Mikhail Sennikovsky (mikhail.sennikovs...@cloud.ionos.com) wrote: > > Currently offloads disabled by guest via the > > VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET > > command are not preserved on VM migration. > > Instead all offloads reported by guest features (v

[PATCH v2] virtio-net: prevent offloads reset on migration

2019-10-02 Thread Mikhail Sennikovsky
d setting it to false for the migration case. Signed-off-by: Mikhail Sennikovsky --- hw/display/virtio-gpu-base.c | 3 ++- hw/net/virtio-net.c | 5 +++-- hw/virtio/virtio.c | 11 ++- include/hw/virtio/virtio.h | 2 +- 4 files changed, 12 insertions(+), 9 deleti

[PATCH v2] virtio-net: prevent offloads reset on migration

2019-10-02 Thread Mikhail Sennikovsky
Hi all, This is the second version of the patch with the coding style problem fixed. Regards, Mikhail Mikhail Sennikovsky (1): virtio-net: prevent offloads reset on migration hw/display/virtio-gpu-base.c | 3 ++- hw/net/virtio-net.c | 5 +++-- hw/virtio/virtio.c | 11

[PATCH] virtio-net: prevent offloads reset on migration

2019-10-01 Thread Mikhail Sennikovsky
to illustrate the problem and potentially initiate a further discussion on the best way of fixing it. Thanks & Regards, Mikhail Mikhail Sennikovsky (1): virtio-net: prevent offloads reset on migration hw/display/virtio-gpu-base.c | 3 ++- hw/net/virtio-net.c | 5 +++--

[PATCH] virtio-net: prevent offloads reset on migration

2019-10-01 Thread Mikhail Sennikovsky
d setting it to false for the migration case. Signed-off-by: Mikhail Sennikovsky --- hw/display/virtio-gpu-base.c | 3 ++- hw/net/virtio-net.c | 5 +++-- hw/virtio/virtio.c | 10 +- include/hw/virtio/virtio.h | 2 +- 4 files changed, 11 insertions(+), 9 deleti