projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efa67e0
)
KVM: move slots_lock acquision down to vapic_exit
author
Marcelo Tosatti
<
[email protected]
>
Mon, 23 Jun 2008 15:04:25 +0000
(12:04 -0300)
committer
Avi Kivity
<
[email protected]
>
Sun, 20 Jul 2008 09:42:36 +0000
(12:42 +0300)
There is no need to grab slots_lock if the vapic_page will not
be touched.
Signed-off-by: Marcelo Tosatti <
[email protected]
>
Signed-off-by: Avi Kivity <
[email protected]
>
arch/x86/kvm/x86.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/x86.c
b/arch/x86/kvm/x86.c
index f726ba79fd3aab9d4c8f65e15bbef29e334f1c4f..55906e4c46765b8a92998f7995b46a6fc3cc6c26 100644
(file)
--- a/
arch/x86/kvm/x86.c
+++ b/
arch/x86/kvm/x86.c
@@
-2787,8
+2787,10
@@
static void vapic_exit(struct kvm_vcpu *vcpu)
if (!apic || !apic->vapic_addr)
return;
+ down_read(&vcpu->kvm->slots_lock);
kvm_release_page_dirty(apic->vapic_page);
mark_page_dirty(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT);
+ up_read(&vcpu->kvm->slots_lock);
}
static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
@@
-2944,9
+2946,7
@@
out:
post_kvm_run_save(vcpu, kvm_run);
- down_read(&vcpu->kvm->slots_lock);
vapic_exit(vcpu);
- up_read(&vcpu->kvm->slots_lock);
return r;
}