qemu/target-ppc
Jan Kiszka ea375f9ab8 KVM: Rework VCPU state writeback API
This grand cleanup drops all reset and vmsave/load related
synchronization points in favor of four(!) generic hooks:

- cpu_synchronize_all_states in qemu_savevm_state_complete
  (initial sync from kernel before vmsave)
- cpu_synchronize_all_post_init in qemu_loadvm_state
  (writeback after vmload)
- cpu_synchronize_all_post_init in main after machine init
- cpu_synchronize_all_post_reset in qemu_system_reset
  (writeback after system reset)

These writeback points + the existing one of VCPU exec after
cpu_synchronize_state map on three levels of writeback:

- KVM_PUT_RUNTIME_STATE (during runtime, other VCPUs continue to run)
- KVM_PUT_RESET_STATE   (on synchronous system reset, all VCPUs stopped)
- KVM_PUT_FULL_STATE    (on init or vmload, all VCPUs stopped as well)

This level is passed to the arch-specific VCPU state writing function
that will decide which concrete substates need to be written. That way,
no writer of load, save or reset functions that interact with in-kernel
KVM states will ever have to worry about synchronization again. That
also means that a lot of reasons for races, segfaults and deadlocks are
eliminated.

cpu_synchronize_state remains untouched, just as Anthony suggested. We
continue to need it before reading or writing of VCPU states that are
also tracked by in-kernel KVM subsystems.

Consequently, this patch removes many cpu_synchronize_state calls that
are now redundant, just like remaining explicit register syncs.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-03-04 00:29:28 -03:00
..
STATUS Update PowerPC emulation status file. 2007-10-25 21:38:16 +00:00
cpu.h target-ppc: fix SPE evcmp* instructions 2010-02-27 16:10:49 +01:00
exec.h kill regs_to_env and env_to_regs 2010-01-19 16:31:02 -06:00
helper.c PPC: Fix large pages 2010-02-14 16:10:54 +02:00
helper.h target-ppc: change DCR helpers to target_long arguments 2010-02-06 17:14:24 +01:00
helper_regs.h Replace always_inline with inline 2009-08-16 09:06:54 +00:00
kvm.c KVM: Rework VCPU state writeback API 2010-03-04 00:29:28 -03:00
kvm_ppc.c kvm ppc: Remove unused label 2009-11-12 11:23:55 -06:00
kvm_ppc.h PPC: tell the guest about the time base frequency 2010-02-14 16:10:54 +02:00
machine.c KVM: Rework VCPU state writeback API 2010-03-04 00:29:28 -03:00
mfrom_table.c find -type f | xargs sed -i 's/[\t ]$//g' # on most files 2007-09-16 21:08:06 +00:00
mfrom_table_gen.c find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex. 2007-09-17 08:09:54 +00:00
op_helper.c target-ppc: change DCR helpers to target_long arguments 2010-02-06 17:14:24 +01:00
translate.c target-ppc: don't print invalid opcode messages on the console 2010-02-28 16:36:44 +01:00
translate_init.c target-ppc: simpler definitions for microcontrollers based on e300 2009-10-18 16:15:47 +02:00