Re: [PATCH v3 3/6] migration: Factor out checks for advised and listening incomming postcopy

2023-01-09 Thread David Hildenbrand
On 09.01.23 15:39, David Hildenbrand wrote: On 05.01.23 18:18, Peter Xu wrote: On Thu, Dec 22, 2022 at 12:02:12PM +0100, David Hildenbrand wrote: +bool migration_incoming_postcopy_listening(void) +{ +PostcopyState ps = postcopy_state_get(); + +return ps >= POSTCOPY_INCOMING_LISTENING &&

Re: [PATCH v3 3/6] migration: Factor out checks for advised and listening incomming postcopy

2023-01-09 Thread David Hildenbrand
On 05.01.23 18:18, Peter Xu wrote: On Thu, Dec 22, 2022 at 12:02:12PM +0100, David Hildenbrand wrote: +bool migration_incoming_postcopy_listening(void) +{ +PostcopyState ps = postcopy_state_get(); + +return ps >= POSTCOPY_INCOMING_LISTENING && ps < POSTCOPY_INCOMING_END; +} This name i

Re: [PATCH v3 3/6] migration: Factor out checks for advised and listening incomming postcopy

2023-01-05 Thread Peter Xu
On Thu, Dec 22, 2022 at 12:02:12PM +0100, David Hildenbrand wrote: > +bool migration_incoming_postcopy_listening(void) > +{ > +PostcopyState ps = postcopy_state_get(); > + > +return ps >= POSTCOPY_INCOMING_LISTENING && ps < POSTCOPY_INCOMING_END; > +} This name is misleading, IMHO. The co

[PATCH v3 3/6] migration: Factor out checks for advised and listening incomming postcopy

2022-12-22 Thread David Hildenbrand
Let's factor out both checks, to be used in virtio-mem context next. While at it, fix a spelling error in a related comment. Signed-off-by: David Hildenbrand --- include/migration/misc.h | 6 +- migration/migration.c| 14 ++ migration/ram.c | 16 ++-- 3