summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/kvmclock.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@ziepe.ca>2017-10-31 14:28:09 -0600
committerPaolo Bonzini <pbonzini@redhat.com>2017-11-02 18:23:18 +0100
commit008755209ce1ae86c0f562a44810b57d9ea31a71 (patch)
treedc6c407efacaa82779e14863d333bd1b079972bf /arch/x86/kernel/kvmclock.c
parentcc9085b6875323fd0c935ee7176583bb572821ee (diff)
downloadlinux-008755209ce1ae86c0f562a44810b57d9ea31a71.tar.gz
linux-008755209ce1ae86c0f562a44810b57d9ea31a71.tar.bz2
linux-008755209ce1ae86c0f562a44810b57d9ea31a71.zip
kvm: Return -ENODEV from update_persistent_clock
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>
Diffstat (limited to 'arch/x86/kernel/kvmclock.c')
-rw-r--r--arch/x86/kernel/kvmclock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index d88967659098..5b609e28ce3f 100644
--- a/arch/x86/kernel/kvmclock.c
+++ b/arch/x86/kernel/kvmclock.c
@@ -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)