1
0
Fork 0
alistair23-linux/arch/x86
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
..
boot x86/boot: Use CROSS_COMPILE prefix for readelf 2017-05-21 13:04:27 +02:00
configs Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 20:51:12 -07:00
crypto crypto: glue_helper - remove the le128_gf128mul_x_ble function 2017-04-05 21:58:37 +08:00
entry Revert "x86/entry: Fix the end of the stack for newly forked tasks" 2017-05-24 09:05:16 +02:00
events perf/core improvements and fixes: 2017-05-03 19:28:27 +02:00
hyperv char/misc patches for 4.12-rc1 2017-05-04 19:15:35 -07:00
ia32 sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
include Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-27 09:06:43 -07:00
kernel kvm: async_pf: fix rcu_irq_enter() with irqs enabled 2017-06-06 14:43:16 +02:00
kvm KVM: async_pf: avoid async pf injection when in guest mode 2017-06-11 08:39:24 +02:00
lguest Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 20:51:12 -07:00
lib x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility 2017-05-05 08:31:05 +02:00
math-emu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mm Revert "x86/PAT: Fix Xorg regression on CPUs that don't support PAT" 2017-06-01 15:52:23 +02:00
net x86: use set_memory.h header 2017-05-08 17:15:13 -07:00
oprofile x86/oprofile/nmi: Convert to hotplug state machine 2016-11-22 23:34:43 +01:00
pci pci-v4.12-changes 2017-05-08 19:03:25 -07:00
platform x86/efi: Correct EFI identity mapping under 'efi=old_map' when KASLR is enabled 2017-05-28 11:06:16 +02:00
power x86/mm: Add support for gbpages to kernel_ident_mapping_init() 2017-05-08 08:28:40 +02:00
purgatory kasan: do not sanitize kexec purgatory 2017-03-31 17:13:30 -07:00
ras RAS: Add a Corrected Errors Collector 2017-03-28 08:54:48 +02:00
realmode x86: use set_memory.h header 2017-05-08 17:15:13 -07:00
tools x86/tools: Fix gcc-7 warning in relocs.c 2016-12-19 11:50:24 +01: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
video x86/video: Don't assume all FB devices are PCI devices 2016-03-15 11:08:26 +01:00
xen xen: make xen_flush_tlb_all() static 2017-05-19 08:04:25 +02:00
.gitignore
Kbuild Drivers: hv vmbus: Move Hypercall page setup out of common code 2017-01-19 11:42:07 +01:00
Kconfig x86/watchdog: Fix Kconfig help text file path reference to lockup watchdog documentation 2017-05-24 09:06:32 +02:00
Kconfig.cpu
Kconfig.debug usb/early: Add driver for xhci debug capability 2017-03-21 12:30:05 +01:00
Makefile x86/build: Permit building with old make versions 2017-05-24 09:05:17 +02:00
Makefile.um
Makefile_32.cpu x86/build: Mostly disable '-maccumulate-outgoing-args' 2017-03-30 11:53:04 +02:00