KVM: Reduce stack usage in kvm_pv_mmu_op()
commitea618866ead0126be93107cdf700b43e7c1854f3
authorDave Hansen <dave@linux.vnet.ibm.com>
Thu, 6 Aug 2009 17:39:52 +0000 (6 14:39 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:17:12 +0000 (8 20:17 -0700)
tree9ec4d4c05579aaacdcf1537ab2cf2d630b88d7b5
parent990c4b98649a36713e5f138d40ea6d81f6e5dae0
KVM: Reduce stack usage in kvm_pv_mmu_op()

(cherry picked from commit 6ad18fba05228fb1d47cdbc0339fe8b3fca1ca26)

We're in a hot path.  We can't use kmalloc() because
it might impact performance.  So, we just stick the buffer that
we need into the kvm_vcpu_arch structure.  This is used very
often, so it is not really a waste.

We also have to move the buffer structure's definition to the
arch-specific x86 kvm header.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/mmu.c
include/asm-x86/kvm_host.h