KVM: PPC: Book3S PR: Take SRCU read lock around RTAS kvm_read_guest() call
authorPaul Mackerras <paulus@samba.org>
Sat, 19 Jul 2014 07:59:35 +0000 (17:59 +1000)
committerAlexander Graf <agraf@suse.de>
Mon, 28 Jul 2014 13:23:16 +0000 (15:23 +0200)
commitef1af2e29622ff3403926ae801a2b10da075a2de
treeeace6cec47bc537474d93986f5f33d136aeb29c9
parenta0840240c0c6bcbac8f0f5db11f95c19aaf9b52f
KVM: PPC: Book3S PR: Take SRCU read lock around RTAS kvm_read_guest() call

This does for PR KVM what c9438092cae4 ("KVM: PPC: Book3S HV: Take SRCU
read lock around kvm_read_guest() call") did for HV KVM, that is,
eliminate a "suspicious rcu_dereference_check() usage!" warning by
taking the SRCU lock around the call to kvmppc_rtas_hcall().

It also fixes a return of RESUME_HOST to return EMULATE_FAIL instead,
since kvmppc_h_pr() is supposed to return EMULATE_* values.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/book3s_pr_papr.c