aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-12-23 11:35:24 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 10:35:45 -0500
commite93f8a0f821e290ac5149830110a5f704db7a1fc (patch)
treef88a5e97286031a8105d63a069a4131b74dab113 /arch/x86/kvm/x86.c
parenta983fb238728e1123177e8058d4f644b949a7d05 (diff)
KVM: convert io_bus to SRCU
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 28127c936c3b..9b42673df4af 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2851,7 +2851,7 @@ static int vcpu_mmio_write(struct kvm_vcpu *vcpu, gpa_t addr, int len,
2851 !kvm_iodevice_write(&vcpu->arch.apic->dev, addr, len, v)) 2851 !kvm_iodevice_write(&vcpu->arch.apic->dev, addr, len, v))
2852 return 0; 2852 return 0;
2853 2853
2854 return kvm_io_bus_write(&vcpu->kvm->mmio_bus, addr, len, v); 2854 return kvm_io_bus_write(vcpu->kvm, KVM_MMIO_BUS, addr, len, v);
2855} 2855}
2856 2856
2857static int vcpu_mmio_read(struct kvm_vcpu *vcpu, gpa_t addr, int len, void *v) 2857static int vcpu_mmio_read(struct kvm_vcpu *vcpu, gpa_t addr, int len, void *v)
@@ -2860,7 +2860,7 @@ static int vcpu_mmio_read(struct kvm_vcpu *vcpu, gpa_t addr, int len, void *v)
2860 !kvm_iodevice_read(&vcpu->arch.apic->dev, addr, len, v)) 2860 !kvm_iodevice_read(&vcpu->arch.apic->dev, addr, len, v))
2861 return 0; 2861 return 0;
2862 2862
2863 return kvm_io_bus_read(&vcpu->kvm->mmio_bus, addr, len, v); 2863 return kvm_io_bus_read(vcpu->kvm, KVM_MMIO_BUS, addr, len, v);
2864} 2864}
2865 2865
2866static int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes, 2866static int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes,
@@ -3345,11 +3345,12 @@ static int kernel_pio(struct kvm_vcpu *vcpu, void *pd)
3345 int r; 3345 int r;
3346 3346
3347 if (vcpu->arch.pio.in) 3347 if (vcpu->arch.pio.in)
3348 r = kvm_io_bus_read(&vcpu->kvm->pio_bus, vcpu->arch.pio.port, 3348 r = kvm_io_bus_read(vcpu->kvm, KVM_PIO_BUS, vcpu->arch.pio.port,
3349 vcpu->arch.pio.size, pd); 3349 vcpu->arch.pio.size, pd);
3350 else 3350 else
3351 r = kvm_io_bus_write(&vcpu->kvm->pio_bus, vcpu->arch.pio.port, 3351 r = kvm_io_bus_write(vcpu->kvm, KVM_PIO_BUS,
3352 vcpu->arch.pio.size, pd); 3352 vcpu->arch.pio.port, vcpu->arch.pio.size,
3353 pd);
3353 return r; 3354 return r;
3354} 3355}
3355 3356
@@ -3360,7 +3361,7 @@ static int pio_string_write(struct kvm_vcpu *vcpu)
3360 int i, r = 0; 3361 int i, r = 0;
3361 3362
3362 for (i = 0; i < io->cur_count; i++) { 3363 for (i = 0; i < io->cur_count; i++) {
3363 if (kvm_io_bus_write(&vcpu->kvm->pio_bus, 3364 if (kvm_io_bus_write(vcpu->kvm, KVM_PIO_BUS,
3364 io->port, io->size, pd)) { 3365 io->port, io->size, pd)) {
3365 r = -EOPNOTSUPP; 3366 r = -EOPNOTSUPP;
3366 break; 3367 break;