KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots
authorAvi Kivity <avi@redhat.com>
Tue, 4 May 2010 09:58:32 +0000 (12:58 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 19 May 2010 08:36:35 +0000 (11:36 +0300)
commit8facbbff071ff2b19268d3732e31badc60471e21
tree1779b2bb158c8e1bf99560fb3fd16647e3e371f7
parentcafd66595d92591e4bd25c3904e004fc6f897e2d
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>
arch/x86/kvm/mmu.c