Skip to content

Commit 37d8bad

Browse files
lrq-maxsean-jc
authored andcommitted
KVM: Remove obsolete comment about locking for kvm_io_bus_read/write
Nobody is actually calling these functions with slots_lock held, The srcu_dereference() in kvm_io_bus_read/write() precisely communicates both what is being protected, and what provides the protection. so the comments are no longer needed Suggested-by: Sean Christopherson <[email protected]> Signed-off-by: Li RongQing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 54a1a24 commit 37d8bad

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

virt/kvm/kvm_main.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5765,7 +5765,6 @@ static int __kvm_io_bus_write(struct kvm_vcpu *vcpu, struct kvm_io_bus *bus,
57655765
return -EOPNOTSUPP;
57665766
}
57675767

5768-
/* kvm_io_bus_write - called under kvm->slots_lock */
57695768
int kvm_io_bus_write(struct kvm_vcpu *vcpu, enum kvm_bus bus_idx, gpa_t addr,
57705769
int len, const void *val)
57715770
{
@@ -5786,7 +5785,6 @@ int kvm_io_bus_write(struct kvm_vcpu *vcpu, enum kvm_bus bus_idx, gpa_t addr,
57865785
}
57875786
EXPORT_SYMBOL_GPL(kvm_io_bus_write);
57885787

5789-
/* kvm_io_bus_write_cookie - called under kvm->slots_lock */
57905788
int kvm_io_bus_write_cookie(struct kvm_vcpu *vcpu, enum kvm_bus bus_idx,
57915789
gpa_t addr, int len, const void *val, long cookie)
57925790
{
@@ -5836,7 +5834,6 @@ static int __kvm_io_bus_read(struct kvm_vcpu *vcpu, struct kvm_io_bus *bus,
58365834
return -EOPNOTSUPP;
58375835
}
58385836

5839-
/* kvm_io_bus_read - called under kvm->slots_lock */
58405837
int kvm_io_bus_read(struct kvm_vcpu *vcpu, enum kvm_bus bus_idx, gpa_t addr,
58415838
int len, void *val)
58425839
{

0 commit comments

Comments
 (0)