diff mbox

kvm: Return -ENODEV from update_persistent_clock

Message ID 20171031202809.GA1272@ziepe.ca (mailing list archive)
State New, archived
Headers show

Commit Message

Jason Gunthorpe Oct. 31, 2017, 8:28 p.m. UTC
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>
---
 arch/x86/kernel/kvmclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini Nov. 2, 2017, 5:23 p.m. UTC | #1
On 31/10/2017 21:28, Jason Gunthorpe wrote:
> 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>
> ---
>  arch/x86/kernel/kvmclock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
> index d88967659098b5..5b609e28ce3f40 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)
> 

Queued, thanks.

Paolo
diff mbox

Patch

diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index d88967659098b5..5b609e28ce3f40 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)