1
0
Fork 0
alistair23-linux/arch
Wanpeng Li 9bc1f09f6f KVM: async_pf: avoid async pf injection when in guest mode
INFO: task gnome-terminal-:1734 blocked for more than 120 seconds.
       Not tainted 4.12.0-rc4+ #8
 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 gnome-terminal- D    0  1734   1015 0x00000000
 Call Trace:
  __schedule+0x3cd/0xb30
  schedule+0x40/0x90
  kvm_async_pf_task_wait+0x1cc/0x270
  ? __vfs_read+0x37/0x150
  ? prepare_to_swait+0x22/0x70
  do_async_page_fault+0x77/0xb0
  ? do_async_page_fault+0x77/0xb0
  async_page_fault+0x28/0x30

This is triggered by running both win7 and win2016 on L1 KVM simultaneously,
and then gives stress to memory on L1, I can observed this hang on L1 when
at least ~70% swap area is occupied on L0.

This is due to async pf was injected to L2 which should be injected to L1,
L2 guest starts receiving pagefault w/ bogus %cr2(apf token from the host
actually), and L1 guest starts accumulating tasks stuck in D state in
kvm_async_pf_task_wait() since missing PAGE_READY async_pfs.

This patch fixes the hang by doing async pf when executing L1 guest.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-06-11 08:39:24 +02:00
..
alpha osf_wait4(): fix infoleak 2017-05-21 13:10:07 -04:00
arc Kbuild UAPI header export updates for v4.12 2017-05-10 20:45:36 -07:00
arm KVM/ARM Fixes for v4.12-rc5 - Take 2 2017-06-08 15:04:38 +02:00
arm64 KVM/ARM Fixes for v4.12-rc5 - Take 2 2017-06-08 15:04:38 +02:00
blackfin uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
c6x uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
cris devicetree: Move include prefixes from arch to separate directory 2017-05-18 23:55:48 -07:00
frv frv: declare jiffies to be located in the .data section 2017-06-02 15:07:37 -07:00
h8300 uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
hexagon uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
ia64 Kbuild UAPI header export updates for v4.12 2017-05-10 20:45:36 -07:00
m32r uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
m68k uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
metag devicetree: Move include prefixes from arch to separate directory 2017-05-18 23:55:48 -07:00
microblaze uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
mips kthread: fix boot hang (regression) on MIPS/OpenRISC 2017-05-29 09:40:54 -07:00
mn10300 uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
nios2 nios2 update for v4.12-rc1 2017-05-12 09:53:16 -07:00
openrisc kthread: fix boot hang (regression) on MIPS/OpenRISC 2017-05-29 09:40:54 -07:00
parisc uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
powerpc powerpc fixes for 4.12 #4 2017-05-27 09:28:34 -07:00
s390 KVM: s390: Fix for master (4.12) 2017-06-08 16:35:18 +02:00
score uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
sh Kbuild UAPI header export updates for v4.12 2017-05-10 20:45:36 -07:00
sparc sparc/ftrace: Fix ftrace graph time measurement 2017-05-17 12:07:47 -07:00
tile arch/include: remove empty Kbuild files 2017-05-11 00:22:18 +09:00
um Merge branch 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2017-05-13 10:20:02 -07:00
unicore32 Kbuild UAPI header export updates for v4.12 2017-05-10 20:45:36 -07:00
x86 KVM: async_pf: avoid async pf injection when in guest mode 2017-06-11 08:39:24 +02:00
xtensa uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
.gitignore
Kconfig Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-10 10:30:46 -07:00