[PATCH 20/22] vl: move CHECKPOINT_INIT after preconfig

Paolo Bonzini posted 22 patches 5 years, 3 months ago
There is a newer version of this series
[PATCH 20/22] vl: move CHECKPOINT_INIT after preconfig
Posted by Paolo Bonzini 5 years, 3 months ago
Move CHECKPOINT_INIT right before the machine initialization is
completed.  Everything before is essentially an extension of
command line parsing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 softmmu/vl.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/softmmu/vl.c b/softmmu/vl.c
index 0a6f47e7d6..e9391929f6 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3194,6 +3194,11 @@ void qemu_finish_machine_init(void)
         exit(1);
     }
 
+    /* This checkpoint is required by replay to separate prior clock
+       reading from the other reads, because timer polling functions query
+       clock values from the log. */
+    replay_checkpoint(CHECKPOINT_INIT);
+
     machine_run_board_init(current_machine);
 
     /*
@@ -4424,11 +4429,6 @@ void qemu_init(int argc, char **argv, char **envp)
     if (foreach_device_config(DEV_DEBUGCON, debugcon_parse) < 0)
         exit(1);
 
-    /* This checkpoint is required by replay to separate prior clock
-       reading from the other reads, because timer polling functions query
-       clock values from the log. */
-    replay_checkpoint(CHECKPOINT_INIT);
-
     current_machine->boot_order = boot_order;
 
     /* parse features once if machine provides default cpu_type */
-- 
2.26.2



Re: [PATCH 20/22] vl: move CHECKPOINT_INIT after preconfig
Posted by Philippe Mathieu-Daudé 5 years, 3 months ago
On 10/21/20 10:57 PM, Paolo Bonzini wrote:
> Move CHECKPOINT_INIT right before the machine initialization is
> completed.  Everything before is essentially an extension of
> command line parsing.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>   softmmu/vl.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 0a6f47e7d6..e9391929f6 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -3194,6 +3194,11 @@ void qemu_finish_machine_init(void)
>           exit(1);
>       }
>   
> +    /* This checkpoint is required by replay to separate prior clock
> +       reading from the other reads, because timer polling functions query
> +       clock values from the log. */
> +    replay_checkpoint(CHECKPOINT_INIT);
> +
>       machine_run_board_init(current_machine);
>   
>       /*
> @@ -4424,11 +4429,6 @@ void qemu_init(int argc, char **argv, char **envp)
>       if (foreach_device_config(DEV_DEBUGCON, debugcon_parse) < 0)
>           exit(1);
>   
> -    /* This checkpoint is required by replay to separate prior clock
> -       reading from the other reads, because timer polling functions query
> -       clock values from the log. */
> -    replay_checkpoint(CHECKPOINT_INIT);
> -
>       current_machine->boot_order = boot_order;
>   
>       /* parse features once if machine provides default cpu_type */
>