[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 06/11] hvf: Simplify post reset/init/loadvm hooks
From: |
Peter Maydell |
Subject: |
Re: [PATCH v6 06/11] hvf: Simplify post reset/init/loadvm hooks |
Date: |
Thu, 28 Jan 2021 15:28:13 +0000 |
On Wed, 20 Jan 2021 at 22:44, Alexander Graf <agraf@csgraf.de> 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>
What's the difference between HVF and KVM that means this code
doesn't have the same structure the KVM code does here?
thanks
-- PMM
- [PATCH v6 00/11] hvf: Implement Apple Silicon Support, Alexander Graf, 2021/01/20
- [PATCH v6 02/11] hvf: x86: Remove unused definitions, Alexander Graf, 2021/01/20
- [PATCH v6 06/11] hvf: Simplify post reset/init/loadvm hooks, Alexander Graf, 2021/01/20
- Re: [PATCH v6 06/11] hvf: Simplify post reset/init/loadvm hooks,
Peter Maydell <=
- [PATCH v6 01/11] hvf: Add hypervisor entitlement to output binaries, Alexander Graf, 2021/01/20
- [PATCH v6 04/11] hvf: Introduce hvf vcpu struct, Alexander Graf, 2021/01/20
- [PATCH v6 03/11] hvf: Move common code out, Alexander Graf, 2021/01/20
- [PATCH v6 08/11] arm: Add Hypervisor.framework build target, Alexander Graf, 2021/01/20
- [PATCH v6 09/11] arm/hvf: Add a WFI handler, Alexander Graf, 2021/01/20
- [PATCH v6 05/11] arm: Set PSCI to 0.2 for HVF, Alexander Graf, 2021/01/20