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 <ag...@csgraf.de> > Reviewed-by: Roman Bolshakov <r.bolsha...@yadro.com> > Tested-by: Roman Bolshakov <r.bolsha...@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 <s...@redhat.com>
signature.asc
Description: PGP signature