linux/arch/powerpc
Bharat Bhushan 40fde70d0d kvm: ppc: booke: check range page invalidation progress on page setup
When the MM code is invalidating a range of pages, it calls the KVM
kvm_mmu_notifier_invalidate_range_start() notifier function, which calls
kvm_unmap_hva_range(), which arranges to flush all the TLBs for guest pages.
However, the Linux PTEs for the range being flushed are still valid at
that point.  We are not supposed to establish any new references to pages
in the range until the ...range_end() notifier gets called.
The PPC-specific KVM code doesn't get any explicit notification of that;
instead, we are supposed to use mmu_notifier_retry() to test whether we
are or have been inside a range flush notifier pair while we have been
referencing a page.

This patch calls the mmu_notifier_retry() while mapping the guest
page to ensure we are not referencing a page when in range invalidation.

This call is inside a region locked with kvm->mmu_lock, which is the
same lock that is called by the KVM MMU notifier functions, thus
ensuring that no new notification can proceed while we are in the
locked region.

Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Acked-by: Alexander Graf <agraf@suse.de>
[Backported to 3.12 - Paolo]
Reviewed-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-10-10 11:40:08 +02:00
..
boot powerpc/zImage: make the "OF" wrapper support ePAPR boot 2013-09-25 14:18:44 +10:00
configs
crypto
include powerpc: Remove ksp_limit on ppc64 2013-09-25 14:15:51 +10:00
kernel powerpc/tm: Switch out userspace PPR and DSCR sooner 2013-10-03 17:25:51 +10:00
kvm kvm: ppc: booke: check range page invalidation progress on page setup 2013-10-10 11:40:08 +02:00
lib powerpc: Restore registers on error exit from csum_partial_copy_generic() 2013-10-03 17:22:42 +10:00
math-emu
mm powerpc: Fix memory hotplug with sparse vmemmap 2013-10-03 17:21:38 +10:00
net
oprofile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-09-06 10:49:42 -07:00
perf powerpc/perf: Fix handling of FAB events 2013-10-03 17:25:38 +10:00
platforms powerpc/pseries: Do not start secondaries in Open Firmware 2013-09-25 14:19:00 +10:00
sysdev IOMMU Updates for Linux v3.12 2013-09-12 11:29:26 -07:00
xmon powerpc/xmon: Fix printing of set of CPUs in xmon 2013-09-05 17:29:19 +10:00
Kconfig Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
Kconfig.debug
Makefile
relocs_check.pl