https://github.com/torvalds/linux
Revision 744961341d472db6272ed9b42319a90f5a2aa7c4 authored by Igor Mammedov on 20 March 2015, 12:21:37 UTC, committed by Marcelo Tosatti on 24 March 2015, 00:23:44 UTC
KVM guest can fail to startup with following trace on host:

qemu-system-x86: page allocation failure: order:4, mode:0x40d0
Call Trace:
  dump_stack+0x47/0x67
  warn_alloc_failed+0xee/0x150
  __alloc_pages_direct_compact+0x14a/0x150
  __alloc_pages_nodemask+0x776/0xb80
  alloc_kmem_pages+0x3a/0x110
  kmalloc_order+0x13/0x50
  kmemdup+0x1b/0x40
  __kvm_set_memory_region+0x24a/0x9f0 [kvm]
  kvm_set_ioapic+0x130/0x130 [kvm]
  kvm_set_memory_region+0x21/0x40 [kvm]
  kvm_vm_ioctl+0x43f/0x750 [kvm]

Failure happens when attempting to allocate pages for
'struct kvm_memslots', however it doesn't have to be
present in physically contiguous (kmalloc-ed) address
space, change allocation to kvm_kvzalloc() so that
it will be vmalloc-ed when its size is more then a page.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
1 parent c806a6a
History
Tip revision: 744961341d472db6272ed9b42319a90f5a2aa7c4 authored by Igor Mammedov on 20 March 2015, 12:21:37 UTC
kvm: avoid page allocation failure in kvm_set_memory_region()
Tip revision: 7449613
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.2 KB
.mailmap -rw-r--r-- 4.9 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 94.0 KB
Kbuild -rw-r--r-- 2.1 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 298.6 KB
Makefile -rw-r--r-- 53.3 KB
README -rw-r--r-- 18.3 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top