Skip to contentSkip to conversation

kvm: Return -ENODEV from update_persistent_clock

PATCH Applied Jason Gunthorpe 2 participants 2 messages Oct 31, 2017 – Nov 2, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/x86/kernel/kvmclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/kvmclock.c +1 -1
index d88967659098b5..5b609e28ce3f40 100644
@@ -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)
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 15 lines · Jason Gunthorpe

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.

---
 arch/x86/kernel/kvmclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/kvmclock.c +0 -0
index d88967659098b5..5b609e28ce3f40 100644

arch/x86/kernel/kvmclock.c static void kvm_get_wallclock(struct timespec *now) · line 85

Quoted 8 lines
arch/x86/kernel/kvmclock.c +1 -1
@@ -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)

Queued, thanks.

Paolo