diff options
author | Marcelo Tosatti <marcelo@kvack.org> | 2008-03-18 16:42:34 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-03-25 04:22:17 -0400 |
commit | 707a18a51d83d9180a63b3cbaad8eda7764a8689 (patch) | |
tree | d6c7c76fb3c06fdc177ae4ddacb3cdca05030270 /arch | |
parent | 15aaa819e20cb183f26392ed8ea16020630ef142 (diff) |
KVM: VMX: convert init_rmode_tss() to slots_lock
init_rmode_tss was forgotten during the conversion from mmap_sem to
slots_lock.
INFO: task qemu-system-x86:3748 blocked for more than 120 seconds.
Call Trace:
[<ffffffff8053d100>] __down_read+0x86/0x9e
[<ffffffff8053fb43>] do_page_fault+0x346/0x78e
[<ffffffff8053d235>] trace_hardirqs_on_thunk+0x35/0x3a
[<ffffffff8053dcad>] error_exit+0x0/0xa9
[<ffffffff8035a7a7>] copy_user_generic_string+0x17/0x40
[<ffffffff88099a8a>] :kvm:kvm_write_guest_page+0x3e/0x5f
[<ffffffff880b661a>] :kvm_intel:init_rmode_tss+0xa7/0xf9
[<ffffffff880b7d7e>] :kvm_intel:vmx_vcpu_reset+0x10/0x38a
[<ffffffff8809b9a5>] :kvm:kvm_arch_vcpu_setup+0x20/0x53
[<ffffffff8809a1e4>] :kvm:kvm_vm_ioctl+0xad/0x1cf
[<ffffffff80249dea>] __lock_acquire+0x4f7/0xc28
[<ffffffff8028fad9>] vfs_ioctl+0x21/0x6b
[<ffffffff8028fd75>] do_vfs_ioctl+0x252/0x26b
[<ffffffff8028fdca>] sys_ioctl+0x3c/0x5e
[<ffffffff8020b01b>] system_call_after_swapgs+0x7b/0x80
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/vmx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index f2df03c12f16..8e1462880d1f 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -1433,7 +1433,7 @@ static int init_rmode_tss(struct kvm *kvm) | |||
1433 | int ret = 0; | 1433 | int ret = 0; |
1434 | int r; | 1434 | int r; |
1435 | 1435 | ||
1436 | down_read(¤t->mm->mmap_sem); | 1436 | down_read(&kvm->slots_lock); |
1437 | r = kvm_clear_guest_page(kvm, fn, 0, PAGE_SIZE); | 1437 | r = kvm_clear_guest_page(kvm, fn, 0, PAGE_SIZE); |
1438 | if (r < 0) | 1438 | if (r < 0) |
1439 | goto out; | 1439 | goto out; |
@@ -1456,7 +1456,7 @@ static int init_rmode_tss(struct kvm *kvm) | |||
1456 | 1456 | ||
1457 | ret = 1; | 1457 | ret = 1; |
1458 | out: | 1458 | out: |
1459 | up_read(¤t->mm->mmap_sem); | 1459 | up_read(&kvm->slots_lock); |
1460 | return ret; | 1460 | return ret; |
1461 | } | 1461 | } |
1462 | 1462 | ||