]> git.karo-electronics.de Git - mv-sheeva.git/commit
KVM: PPC: Use get/set for to_svcpu to help preemption
authorAlexander Graf <agraf@suse.de>
Fri, 9 Dec 2011 13:44:13 +0000 (14:44 +0100)
committerAvi Kivity <avi@redhat.com>
Mon, 5 Mar 2012 12:52:30 +0000 (14:52 +0200)
commit468a12c2b53776721ff83517d4a195b85c5fce54
treeba417210997c2e3119525641764303d97db32815
parentd33ad328c0025c45f4688a769aeebddc342222c1
KVM: PPC: Use get/set for to_svcpu to help preemption

When running the 64-bit Book3s PR code without CONFIG_PREEMPT_NONE, we were
doing a few things wrong, most notably access to PACA fields without making
sure that the pointers stay stable accross the access (preempt_disable()).

This patch moves to_svcpu towards a get/put model which allows us to disable
preemption while accessing the shadow vcpu fields in the PACA. That way we
can run preemptible and everyone's happy!

Reported-by: Jörg Sommer <joerg@alea.gnuu.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/include/asm/kvm_book3s.h
arch/powerpc/include/asm/kvm_book3s_32.h
arch/powerpc/include/asm/kvm_book3s_64.h
arch/powerpc/kvm/book3s_32_mmu_host.c
arch/powerpc/kvm/book3s_64_mmu_host.c
arch/powerpc/kvm/book3s_emulate.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/trace.h