linux/arch
Xiao Guangrong 1c118b8226 KVM: MMU: avoid fast page fault fixing mmio page fault
Currently, fast page fault incorrectly tries to fix mmio page fault when
the generation number is invalid (spte.gen != kvm.gen).  It then returns
to guest to retry the fault since it sees the last spte is nonpresent.
This causes an infinite loop.

Since fast page fault only works for direct mmu, the issue exists when
1) tdp is enabled. It is only triggered only on AMD host since on Intel host
   the mmio page fault is recognized as ept-misconfig whose handler call
   fault-page path with error_code = 0

2) guest paging is disabled. Under this case, the issue is hardly discovered
   since paging disable is short-lived and the sptes will be invalid after
   memslot changed for 150 times

Fix it by filtering out MMIO page faults in page_fault_can_be_fast.

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-18 12:26:57 +02:00
..
alpha Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-14 11:42:26 -07:00
arc Couple of Platform updates (Device Tree files primarily) given that the 2013-07-10 10:11:26 -07:00
arm ARM: SoC fixes for 3.11-rc 2013-07-13 15:00:26 -07:00
arm64 Merge tag 'kvm-3.11-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-07-10 18:17:41 -07:00
avr32 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
blackfin blackfin updates for Linux 3.11 2013-07-10 10:12:58 -07:00
c6x Merge branch 'akpm' (updates from Andrew Morton) 2013-07-03 17:12:13 -07:00
cris net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
frv net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
h8300 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
hexagon mm/hexagon: prepare for removing num_physpages and simplify mem_init() 2013-07-03 16:07:36 -07:00
ia64 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
m32r net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
m68k Merge branch 'akpm' (updates from Andrew Morton) 2013-07-03 17:12:13 -07:00
metag arch/metag fixes for v3.11 2013-07-10 10:14:35 -07:00
microblaze Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2013-07-10 10:16:07 -07:00
mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-13 17:42:22 -07:00
mn10300 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
openrisc mm: invoke oom-killer from remaining unconverted page fault handlers 2013-07-09 10:33:20 -07:00
parisc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-14 11:42:26 -07:00
powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-13 17:42:22 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-13 17:42:22 -07:00
score mm: invoke oom-killer from remaining unconverted page fault handlers 2013-07-09 10:33:20 -07:00
sh Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
sparc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-14 11:42:26 -07:00
tile mm: remove free_area_cache 2013-07-10 18:11:34 -07:00
um mm/um: prepare for removing num_physpages and simplify mem_init() 2013-07-03 16:07:37 -07:00
unicore32 reboot: move arch/x86 reboot= handling to generic kernel 2013-07-09 10:33:29 -07:00
x86 KVM: MMU: avoid fast page fault fixing mmio page fault 2013-07-18 12:26:57 +02:00
xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-07-13 17:42:22 -07:00
.gitignore
Kconfig mm: soft-dirty bits for user memory changes tracking 2013-07-03 16:07:26 -07:00