diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2009-12-23 11:35:24 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:35:45 -0500 |
commit | e93f8a0f821e290ac5149830110a5f704db7a1fc (patch) | |
tree | f88a5e97286031a8105d63a069a4131b74dab113 /virt/kvm/eventfd.c | |
parent | a983fb238728e1123177e8058d4f644b949a7d05 (diff) |
KVM: convert io_bus to SRCU
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt/kvm/eventfd.c')
-rw-r--r-- | virt/kvm/eventfd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index a9d3fc6c681c..315a586ec4d5 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c | |||
@@ -463,7 +463,7 @@ static int | |||
463 | kvm_assign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) | 463 | kvm_assign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) |
464 | { | 464 | { |
465 | int pio = args->flags & KVM_IOEVENTFD_FLAG_PIO; | 465 | int pio = args->flags & KVM_IOEVENTFD_FLAG_PIO; |
466 | struct kvm_io_bus *bus = pio ? &kvm->pio_bus : &kvm->mmio_bus; | 466 | enum kvm_bus bus_idx = pio ? KVM_PIO_BUS : KVM_MMIO_BUS; |
467 | struct _ioeventfd *p; | 467 | struct _ioeventfd *p; |
468 | struct eventfd_ctx *eventfd; | 468 | struct eventfd_ctx *eventfd; |
469 | int ret; | 469 | int ret; |
@@ -518,7 +518,7 @@ kvm_assign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) | |||
518 | 518 | ||
519 | kvm_iodevice_init(&p->dev, &ioeventfd_ops); | 519 | kvm_iodevice_init(&p->dev, &ioeventfd_ops); |
520 | 520 | ||
521 | ret = __kvm_io_bus_register_dev(bus, &p->dev); | 521 | ret = kvm_io_bus_register_dev(kvm, bus_idx, &p->dev); |
522 | if (ret < 0) | 522 | if (ret < 0) |
523 | goto unlock_fail; | 523 | goto unlock_fail; |
524 | 524 | ||
@@ -542,7 +542,7 @@ static int | |||
542 | kvm_deassign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) | 542 | kvm_deassign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) |
543 | { | 543 | { |
544 | int pio = args->flags & KVM_IOEVENTFD_FLAG_PIO; | 544 | int pio = args->flags & KVM_IOEVENTFD_FLAG_PIO; |
545 | struct kvm_io_bus *bus = pio ? &kvm->pio_bus : &kvm->mmio_bus; | 545 | enum kvm_bus bus_idx = pio ? KVM_PIO_BUS : KVM_MMIO_BUS; |
546 | struct _ioeventfd *p, *tmp; | 546 | struct _ioeventfd *p, *tmp; |
547 | struct eventfd_ctx *eventfd; | 547 | struct eventfd_ctx *eventfd; |
548 | int ret = -ENOENT; | 548 | int ret = -ENOENT; |
@@ -565,7 +565,7 @@ kvm_deassign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) | |||
565 | if (!p->wildcard && p->datamatch != args->datamatch) | 565 | if (!p->wildcard && p->datamatch != args->datamatch) |
566 | continue; | 566 | continue; |
567 | 567 | ||
568 | __kvm_io_bus_unregister_dev(bus, &p->dev); | 568 | kvm_io_bus_unregister_dev(kvm, bus_idx, &p->dev); |
569 | ioeventfd_release(p); | 569 | ioeventfd_release(p); |
570 | ret = 0; | 570 | ret = 0; |
571 | break; | 571 | break; |