]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Split host-state fields out of kvmppc_book3s_shadow_vcpu
authorPaul Mackerras <paulus@samba.org>
Wed, 29 Jun 2011 00:20:58 +0000 (00:20 +0000)
committerAvi Kivity <avi@redhat.com>
Tue, 12 Jul 2011 10:16:53 +0000 (13:16 +0300)
commit110036f9c51e342b05e219df5be8889dbcbb9c1e
tree4f543088e6a64ce7f1a771c1618668ff27752ecc
parent225e403714b9ce9f34a977d7480abbdefd6f6e11
KVM: PPC: Split host-state fields out of kvmppc_book3s_shadow_vcpu

There are several fields in struct kvmppc_book3s_shadow_vcpu that
temporarily store bits of host state while a guest is running,
rather than anything relating to the particular guest or vcpu.
This splits them out into a new kvmppc_host_state structure and
modifies the definitions in asm-offsets.c to suit.

On 32-bit, we have a kvmppc_host_state structure inside the
kvmppc_book3s_shadow_vcpu since the assembly code needs to be able
to get to them both with one pointer.  On 64-bit they are separate
fields in the PACA.  This means that on 64-bit we don't need to
copy the kvmppc_host_state in and out on vcpu load/unload, and
in future will mean that the book3s_hv code doesn't need a
shadow_vcpu struct in the PACA at all.  That does mean that we
have to be careful not to rely on any values persisting in the
hstate field of the paca across any point where we could block
or get preempted.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/include/asm/kvm_book3s_asm.h
arch/powerpc/include/asm/paca.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kvm/book3s_interrupts.S
arch/powerpc/kvm/book3s_rmhandlers.S
arch/powerpc/kvm/book3s_segment.S