diff options
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ffcb90669ec5..e96038e1bc3a 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -3469,8 +3469,10 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
3469 | goto out; | 3469 | goto out; |
3470 | 3470 | ||
3471 | r = 0; | 3471 | r = 0; |
3472 | local_irq_disable(); | ||
3472 | now_ns = get_kernel_ns(); | 3473 | now_ns = get_kernel_ns(); |
3473 | delta = user_ns.clock - now_ns; | 3474 | delta = user_ns.clock - now_ns; |
3475 | local_irq_enable(); | ||
3474 | kvm->arch.kvmclock_offset = delta; | 3476 | kvm->arch.kvmclock_offset = delta; |
3475 | break; | 3477 | break; |
3476 | } | 3478 | } |
@@ -3478,8 +3480,10 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
3478 | struct kvm_clock_data user_ns; | 3480 | struct kvm_clock_data user_ns; |
3479 | u64 now_ns; | 3481 | u64 now_ns; |
3480 | 3482 | ||
3483 | local_irq_disable(); | ||
3481 | now_ns = get_kernel_ns(); | 3484 | now_ns = get_kernel_ns(); |
3482 | user_ns.clock = kvm->arch.kvmclock_offset + now_ns; | 3485 | user_ns.clock = kvm->arch.kvmclock_offset + now_ns; |
3486 | local_irq_enable(); | ||
3483 | user_ns.flags = 0; | 3487 | user_ns.flags = 0; |
3484 | 3488 | ||
3485 | r = -EFAULT; | 3489 | r = -EFAULT; |