KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots
commite995b3b2f8e5447928c7754f0702f05cc75646f6
authorAvi Kivity <avi@redhat.com>
Tue, 4 May 2010 09:58:32 +0000 (4 12:58 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:23:03 +0000 (5 11:23 -0700)
treed37f1bfdff175917e5e75c31ec8219a325153f5f
parent89e16408cedfeac6b7289397074bd9b44a594034
KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots

On svm, kvm_read_pdptr() may require reading guest memory, which can sleep.

Push the spinlock into mmu_alloc_roots(), and only take it after we've read
the pdptr.

Tested-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(Cherry-picked from commit 8facbbff071ff2b19268d3732e31badc60471e21)
arch/x86/kvm/mmu.c