original_kernel/arch/powerpc/kvm
Paul Mackerras 081f323bd3 KVM: PPC: Book3S HV: Drop locks around call to kvmppc_pin_guest_page
At the moment we call kvmppc_pin_guest_page() in kvmppc_update_vpa()
with two spinlocks held: the vcore lock and the vcpu->vpa_update_lock.
This is not good, since kvmppc_pin_guest_page() calls down_read() and
get_user_pages_fast(), both of which can sleep.  This bug was introduced
in 2e25aa5f ("KVM: PPC: Book3S HV: Make virtual processor area
registration more robust").

This arranges to drop those spinlocks before calling
kvmppc_pin_guest_page() and re-take them afterwards.  Dropping the
vcore lock in kvmppc_run_core() means we have to set the vcore_state
field to VCORE_RUNNING before we drop the lock, so that other vcpus
won't try to run this vcore.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
2012-06-19 15:04:13 +03:00
..
44x.c
44x_emulate.c
44x_tlb.c
44x_tlb.h
Kconfig
Makefile
book3s.c
book3s_32_mmu.c
book3s_32_mmu_host.c
book3s_32_sr.S
book3s_64_mmu.c
book3s_64_mmu_host.c
book3s_64_mmu_hv.c
book3s_64_slb.S
book3s_64_vio.c
book3s_64_vio_hv.c
book3s_emulate.c
book3s_exports.c
book3s_hv.c
book3s_hv_builtin.c
book3s_hv_interrupts.S
book3s_hv_rm_mmu.c
book3s_hv_rmhandlers.S
book3s_interrupts.S
book3s_mmu_hpte.c
book3s_paired_singles.c
book3s_pr.c
book3s_pr_papr.c
book3s_rmhandlers.S
book3s_segment.S
booke.c
booke.h
booke_emulate.c
booke_interrupts.S
bookehv_interrupts.S
e500.c
e500.h
e500_emulate.c
e500_tlb.c
e500mc.c
emulate.c
fpu.S
powerpc.c
timing.c
timing.h
trace.h