diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 2 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index a58aebef518..37bd730ff85 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -448,7 +448,7 @@ struct kvm_arch { | |||
448 | 448 | ||
449 | unsigned long irq_sources_bitmap; | 449 | unsigned long irq_sources_bitmap; |
450 | s64 kvmclock_offset; | 450 | s64 kvmclock_offset; |
451 | spinlock_t tsc_write_lock; | 451 | raw_spinlock_t tsc_write_lock; |
452 | u64 last_tsc_nsec; | 452 | u64 last_tsc_nsec; |
453 | u64 last_tsc_offset; | 453 | u64 last_tsc_offset; |
454 | u64 last_tsc_write; | 454 | u64 last_tsc_write; |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 9000829d06c..17af71da63a 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1017,7 +1017,7 @@ void kvm_write_tsc(struct kvm_vcpu *vcpu, u64 data) | |||
1017 | unsigned long flags; | 1017 | unsigned long flags; |
1018 | s64 sdiff; | 1018 | s64 sdiff; |
1019 | 1019 | ||
1020 | spin_lock_irqsave(&kvm->arch.tsc_write_lock, flags); | 1020 | raw_spin_lock_irqsave(&kvm->arch.tsc_write_lock, flags); |
1021 | offset = data - native_read_tsc(); | 1021 | offset = data - native_read_tsc(); |
1022 | ns = get_kernel_ns(); | 1022 | ns = get_kernel_ns(); |
1023 | elapsed = ns - kvm->arch.last_tsc_nsec; | 1023 | elapsed = ns - kvm->arch.last_tsc_nsec; |
@@ -1050,7 +1050,7 @@ void kvm_write_tsc(struct kvm_vcpu *vcpu, u64 data) | |||
1050 | kvm->arch.last_tsc_write = data; | 1050 | kvm->arch.last_tsc_write = data; |
1051 | kvm->arch.last_tsc_offset = offset; | 1051 | kvm->arch.last_tsc_offset = offset; |
1052 | kvm_x86_ops->write_tsc_offset(vcpu, offset); | 1052 | kvm_x86_ops->write_tsc_offset(vcpu, offset); |
1053 | spin_unlock_irqrestore(&kvm->arch.tsc_write_lock, flags); | 1053 | raw_spin_unlock_irqrestore(&kvm->arch.tsc_write_lock, flags); |
1054 | 1054 | ||
1055 | /* Reset of TSC must disable overshoot protection below */ | 1055 | /* Reset of TSC must disable overshoot protection below */ |
1056 | vcpu->arch.hv_clock.tsc_timestamp = 0; | 1056 | vcpu->arch.hv_clock.tsc_timestamp = 0; |
@@ -6004,7 +6004,7 @@ int kvm_arch_init_vm(struct kvm *kvm) | |||
6004 | /* Reserve bit 0 of irq_sources_bitmap for userspace irq source */ | 6004 | /* Reserve bit 0 of irq_sources_bitmap for userspace irq source */ |
6005 | set_bit(KVM_USERSPACE_IRQ_SOURCE_ID, &kvm->arch.irq_sources_bitmap); | 6005 | set_bit(KVM_USERSPACE_IRQ_SOURCE_ID, &kvm->arch.irq_sources_bitmap); |
6006 | 6006 | ||
6007 | spin_lock_init(&kvm->arch.tsc_write_lock); | 6007 | raw_spin_lock_init(&kvm->arch.tsc_write_lock); |
6008 | 6008 | ||
6009 | return 0; | 6009 | return 0; |
6010 | } | 6010 | } |