Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-11 Thread David Hildenbrand
Not against it if you want to keep exploring, but if so please avoid using the priority field, also I'd hope the early vmsd will be saved within qemu_savevm_state_setup() so maybe it can be another alternative to save_setup(). Maybe it's still easier we keep going with the save_setup() and the

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-11 Thread Peter Xu
On Wed, Jan 11, 2023 at 05:58:36PM +0100, David Hildenbrand wrote: > On 11.01.23 17:35, Peter Xu wrote: > > On Wed, Jan 11, 2023 at 02:48:09PM +0100, David Hildenbrand wrote: > > > On 10.01.23 21:03, Peter Xu wrote: > > > > On Tue, Jan 10, 2023 at 12:52:32PM +0100, David Hildenbrand wrote: > > > >

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-11 Thread David Hildenbrand
On 11.01.23 17:35, Peter Xu wrote: On Wed, Jan 11, 2023 at 02:48:09PM +0100, David Hildenbrand wrote: On 10.01.23 21:03, Peter Xu wrote: On Tue, Jan 10, 2023 at 12:52:32PM +0100, David Hildenbrand wrote: The following seems to work, That looks much better at least from the diffstat pov

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-11 Thread Peter Xu
On Wed, Jan 11, 2023 at 02:48:09PM +0100, David Hildenbrand wrote: > On 10.01.23 21:03, Peter Xu wrote: > > On Tue, Jan 10, 2023 at 12:52:32PM +0100, David Hildenbrand wrote: > > > The following seems to work, > > > > That looks much better at least from the diffstat pov (comparing to the > >

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-11 Thread David Hildenbrand
On 10.01.23 21:03, Peter Xu wrote: On Tue, Jan 10, 2023 at 12:52:32PM +0100, David Hildenbrand wrote: The following seems to work, That looks much better at least from the diffstat pov (comparing to the existing patch 1+5 and the framework changes), thanks. but makes analyze-migration.py

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-10 Thread Peter Xu
On Tue, Jan 10, 2023 at 12:52:32PM +0100, David Hildenbrand wrote: > The following seems to work, That looks much better at least from the diffstat pov (comparing to the existing patch 1+5 and the framework changes), thanks. > but makes analyze-migration.py angry: > > $

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-10 Thread David Hildenbrand
On 10.01.23 11:18, David Hildenbrand wrote: On 09.01.23 20:54, Peter Xu wrote: On Mon, Jan 09, 2023 at 03:34:48PM +0100, David Hildenbrand wrote: On 05.01.23 18:15, Peter Xu wrote: On Thu, Jan 05, 2023 at 09:35:54AM +0100, David Hildenbrand wrote: On 04.01.23 18:23, Peter Xu wrote: On Thu,

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-10 Thread David Hildenbrand
On 09.01.23 20:54, Peter Xu wrote: On Mon, Jan 09, 2023 at 03:34:48PM +0100, David Hildenbrand wrote: On 05.01.23 18:15, Peter Xu wrote: On Thu, Jan 05, 2023 at 09:35:54AM +0100, David Hildenbrand wrote: On 04.01.23 18:23, Peter Xu wrote: On Thu, Dec 22, 2022 at 12:02:10PM +0100, David

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-09 Thread Peter Xu
On Mon, Jan 09, 2023 at 03:34:48PM +0100, David Hildenbrand wrote: > On 05.01.23 18:15, Peter Xu wrote: > > On Thu, Jan 05, 2023 at 09:35:54AM +0100, David Hildenbrand wrote: > > > On 04.01.23 18:23, Peter Xu wrote: > > > > On Thu, Dec 22, 2022 at 12:02:10PM +0100, David Hildenbrand wrote: > > > >

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-09 Thread David Hildenbrand
On 05.01.23 18:15, Peter Xu wrote: On Thu, Jan 05, 2023 at 09:35:54AM +0100, David Hildenbrand wrote: On 04.01.23 18:23, Peter Xu wrote: On Thu, Dec 22, 2022 at 12:02:10PM +0100, David Hildenbrand wrote: Migrating device state before we start iterating is currently impossible. Introduce and

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-05 Thread Peter Xu
On Thu, Jan 05, 2023 at 09:35:54AM +0100, David Hildenbrand wrote: > On 04.01.23 18:23, Peter Xu wrote: > > On Thu, Dec 22, 2022 at 12:02:10PM +0100, David Hildenbrand wrote: > > > Migrating device state before we start iterating is currently impossible. > > > Introduce and use

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-05 Thread David Hildenbrand
On 04.01.23 18:23, Peter Xu wrote: On Thu, Dec 22, 2022 at 12:02:10PM +0100, David Hildenbrand wrote: Migrating device state before we start iterating is currently impossible. Introduce and use qemu_savevm_state_start_precopy(), and use a new special migration priority -- MIG_PRI_POST_SETUP --

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-05 Thread David Hildenbrand
On 05.01.23 02:27, Michael S. Tsirkin wrote: On Fri, Dec 23, 2022 at 10:34:36AM +0100, David Hildenbrand wrote: On 22.12.22 12:02, David Hildenbrand wrote: For virtio-mem, we want to have the plugged/unplugged state of memory blocks available before migrating any actual RAM content. This

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-04 Thread Michael S. Tsirkin
On Fri, Dec 23, 2022 at 10:34:36AM +0100, David Hildenbrand wrote: > On 22.12.22 12:02, David Hildenbrand wrote: > > For virtio-mem, we want to have the plugged/unplugged state of memory > > blocks available before migrating any actual RAM content. This > > information is immutable on the

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-04 Thread Peter Xu
On Thu, Dec 22, 2022 at 12:02:10PM +0100, David Hildenbrand wrote: > Migrating device state before we start iterating is currently impossible. > Introduce and use qemu_savevm_state_start_precopy(), and use > a new special migration priority -- MIG_PRI_POST_SETUP -- to decide whether > state will

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2022-12-23 Thread David Hildenbrand
On 22.12.22 12:02, David Hildenbrand wrote: For virtio-mem, we want to have the plugged/unplugged state of memory blocks available before migrating any actual RAM content. This information is immutable on the migration source while migration is active, For example, we want to use this

[PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2022-12-22 Thread David Hildenbrand
For virtio-mem, we want to have the plugged/unplugged state of memory blocks available before migrating any actual RAM content. This information is immutable on the migration source while migration is active, For example, we want to use this information for proper preallocation support with