linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm: Return -ENODEV from update_persistent_clock
@ 2017-10-31 20:28 Jason Gunthorpe
  2017-11-02 17:23 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Gunthorpe @ 2017-10-31 20:28 UTC (permalink / raw)
  To: kvm, linux-kernel, H. Peter Anvin, Ingo Molnar, Thomas Gleixner,
	Radim Krm, Paolo Bonzini

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)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm: Return -ENODEV from update_persistent_clock
  2017-10-31 20:28 [PATCH] kvm: Return -ENODEV from update_persistent_clock Jason Gunthorpe
@ 2017-11-02 17:23 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2017-11-02 17:23 UTC (permalink / raw)
  To: Jason Gunthorpe, kvm, linux-kernel, H. Peter Anvin, Ingo Molnar,
	Thomas Gleixner, Radim Krm

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-02 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 20:28 [PATCH] kvm: Return -ENODEV from update_persistent_clock Jason Gunthorpe
2017-11-02 17:23 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).