On Mon, Dec 04, 2023 at 05:23:57PM -0500, Steven Sistare wrote:
> The V6 code does not pass a state to vm_start, and knowledge of 
> vm_was_suspended
> is confined to the global_state and cpus functions.  IMO this is a more 
> modular
> and robust solution, as multiple sites may call vm_start(), and the right 
> thing
> happens.  Look at patch 6.  The changes are minimal because vm_start "just 
> works".

Oh I think I see what you meant.  Sounds good then.

Shall we hide that into vm_prepare_start()?  It seems three's still one
more call sites that always pass in RUNNING (gdb_continue_partial).

If with above, vm_prepare_start() will go into either RUNNING, SUSPENDED,
or an error.  It returns 0 only if RUNNING, -1 for all the rest.  Maybe we
can already also touch up the retval of vm_prepare_start() to be a boolean,
reflecting "whether vcpu needs to be started".

Peter Xu

Reply via email to