[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 12/19] hvf: Simplify post reset/init/loadvm hooks
From: |
Sergio Lopez |
Subject: |
Re: [PATCH v8 12/19] hvf: Simplify post reset/init/loadvm hooks |
Date: |
Thu, 27 May 2021 12:20:37 +0200 |
On Wed, May 19, 2021 at 10:22:46PM +0200, Alexander Graf wrote:
> The hooks we have that call us after reset, init and loadvm really all
> just want to say "The reference of all register state is in the QEMU
> vcpu struct, please push it".
>
> We already have a working pushing mechanism though called cpu->vcpu_dirty,
> so we can just reuse that for all of the above, syncing state properly the
> next time we actually execute a vCPU.
>
> This fixes PSCI resets on ARM, as they modify CPU state even after the
> post init call has completed, but before we execute the vCPU again.
>
> To also make the scheme work for x86, we have to make sure we don't
> move stale eflags into our env when the vcpu state is dirty.
>
> Signed-off-by: Alexander Graf <agraf@csgraf.de>
> Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
> Tested-by: Roman Bolshakov <r.bolshakov@yadro.com>
> ---
> accel/hvf/hvf-accel-ops.c | 27 +++++++--------------------
> target/i386/hvf/x86hvf.c | 5 ++++-
> 2 files changed, 11 insertions(+), 21 deletions(-)
Reviewed-by: Sergio Lopez <slp@redhat.com>
signature.asc
Description: PGP signature
- Re: [PATCH v8 03/19] hvf: Move cpu functions into common directory, (continued)
- [PATCH v8 02/19] hvf: Move vcpu thread functions into common directory, Alexander Graf, 2021/05/19
- [PATCH v8 09/19] hvf: Make synchronize functions static, Alexander Graf, 2021/05/19
- [PATCH v8 07/19] hvf: Split out common code on vcpu init and destroy, Alexander Graf, 2021/05/19
- [PATCH v8 10/19] hvf: Remove hvf-accel-ops.h, Alexander Graf, 2021/05/19
- [PATCH v8 12/19] hvf: Simplify post reset/init/loadvm hooks, Alexander Graf, 2021/05/19
- Re: [PATCH v8 12/19] hvf: Simplify post reset/init/loadvm hooks,
Sergio Lopez <=
- [PATCH v8 08/19] hvf: Use cpu_synchronize_state(), Alexander Graf, 2021/05/19
- [PATCH v8 06/19] hvf: Remove use of hv_uvaddr_t and hv_gpaddr_t, Alexander Graf, 2021/05/19
- [PATCH v8 05/19] hvf: Make hvf_set_phys_mem() static, Alexander Graf, 2021/05/19
- [PATCH v8 14/19] arm/hvf: Add a WFI handler, Alexander Graf, 2021/05/19
- [PATCH v8 11/19] hvf: Introduce hvf vcpu struct, Alexander Graf, 2021/05/19