KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()
authorSanjay Lal <sanjayl@kymasys.com>
Sat, 18 May 2013 13:54:24 +0000 (06:54 -0700)
committerGleb Natapov <gleb@redhat.com>
Wed, 22 May 2013 08:44:09 +0000 (11:44 +0300)
commit6d17c0d1e8a66f5508082cb0fecb8afb7e9a21e4
treeeca5c93989a96bd5afff0e48178286861f8ce475
parentba86e4dda700b3e696119c7f4fad945b90cf5c84
KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()

- As suggested by Gleb, wrap calls to gfn_to_pfn() with srcu_read_lock/unlock().
  Memory slots should be acccessed from a SRCU read section.
- kvm_mips_map_page() now returns an error code to it's callers, instead of
  calling panic() if it cannot find a mapping for a particular gfn.

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
arch/mips/kvm/kvm_tlb.c