]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
kvm: Return -ENODEV from update_persistent_clock
authorJason Gunthorpe <jgg@ziepe.ca>
Tue, 31 Oct 2017 20:28:09 +0000 (14:28 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 2 Nov 2017 17:23:18 +0000 (18:23 +0100)
kvm does not support setting the RTC, so the correct result is -ENODEV.
Returning -1 will cause sync_cmos_clock to keep trying to set the RTC
every second.

Signed-off-by: Jason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kernel/kvmclock.c

index d88967659098b59478633d9707e0045562fdd85c..5b609e28ce3f40514be95ac47cddd5a0c4d77ab0 100644 (file)
@@ -79,7 +79,7 @@ static void kvm_get_wallclock(struct timespec *now)
 
 static int kvm_set_wallclock(const struct timespec *now)
 {
-       return -1;
+       return -ENODEV;
 }
 
 static u64 kvm_clock_read(void)