]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:11:18 +0000 (11:11 -0700)
commit4a277f9cb862ad44d3a83bfcc0cf42727de99ac3
tree87966cb19b527b6f8ce69e2d9a87e7d24162f2da
parent66307ba1647f9666baebd342520bf83cb7832468
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