]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/cpu.c
kvm: reset state from the CPU's reset method
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 Mar 2013 12:11:56 +0000 (13:11 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 May 2014 11:12:40 +0000 (13:12 +0200)
commit50a2c6e55fa2ce5a2916a2c206bad2c6b0e06df1
tree0ad5c6445202d419c26a8e18e9aced87bd51665b
parent7848c8d19f8556666df25044bbd5d8b29439c368
kvm: reset state from the CPU's reset method

Now that we have a CPU object with a reset method, it is better to
keep the KVM reset close to the CPU reset.  Using qemu_register_reset
as we do now keeps them far apart.

With this patch, PPC no longer calls the kvm_arch_ function, so
it can get removed there.  Other arches call it from their CPU
reset handler, and the function gets an ARMCPU/X86CPU/S390CPU.

Note that ARM- and s390-specific functions are called kvm_arm_*
and kvm_s390_*, while x86-specific functions are called kvm_arch_*.
That follows the convention used by the different architectures.
Changing that is the topic of a separate patch.

Reviewed-by: Gleb Natapov <gnatapov@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
13 files changed:
include/sysemu/kvm.h
kvm-all.c
target-arm/cpu.c
target-arm/kvm32.c
target-arm/kvm64.c
target-arm/kvm_arm.h
target-i386/cpu.c
target-i386/kvm.c
target-i386/kvm_i386.h
target-ppc/kvm.c
target-s390x/cpu.c
target-s390x/cpu.h
target-s390x/kvm.c