public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* RE: kvm-clock again
@ 2016-04-05 15:07 Avi Cohen
  2016-04-05 20:25 ` Radim Krčmář
  0 siblings, 1 reply; 10+ messages in thread
From: Avi Cohen @ 2016-04-05 15:07 UTC (permalink / raw)
  To: kvm@vger.kernel.org

What do you think about this simple solution:
 Currently  the KVM updates the system-time in the structure pvclock_vcpu_time_info  in the guest memory  with the MONOTONIC time 
struct pvclock_vcpu_time_info {
        u32   version;
        u32   pad0;
        u64   tsc_timestamp;
        u64   system_time;
        u32   tsc_to_system_mul;
        s8    tsc_shift;
        u8    flags;
        u8    pad[2];
} __attribute__((__packed__));

This is the default kvm-clcok.
I think to add another clock source named - kvm-clock-realtime, and to update system_time with host's REAL_TIME clock.
What is your opinion ?


I want to enter the KVM  code and try to make a REAL_TIME and accurate synchronization between the host and  guest  clocks .
Currently I don’t see that KVM  updates the guest’s clock when I manually set the host’s clock. I don’t see any impact on the guest’s clock Also after booting the guest I see a  diff-time of ~1ms between the 2 clocks. 
Questions:
- What can you tell about the feasibility of this task ?
- Can you give me a reference/guides  for this task’s  design ? where to start ? potential problems ? pvclock ? when to update , when reentering the VM ? etc..

(I’m working with kvm-clock as a source clock, my machine is a very modern x86 with full virtualization support, constant TSC etc..) Thanks  in adavance Avi



^ permalink raw reply	[flat|nested] 10+ messages in thread
* kvm-clock again
@ 2016-04-05 11:12 Avi Cohen
  0 siblings, 0 replies; 10+ messages in thread
From: Avi Cohen @ 2016-04-05 11:12 UTC (permalink / raw)
  To: kvm@vger.kernel.org

Hi,
I’m here again with the kvm-clock issue.
I want to enter the KVM  code and try to make a REAL_TIME and accurate synchronization between the host and  guest  clocks .
Currently I don’t see that KVM  updates the guest’s clock when I manually set the host’s clock. I don’t see any impact on the guest’s clock
Also after booting the guest I see a  diff-time of ~1ms between the 2 clocks. 
Questions:
- What can you tell about the feasibility of this task ?
- Can you give me a reference/guides  for this task’s  design ? where to start ? potential problems ? pvclock ? when to update , when reentering the VM ? etc..

(I’m working with kvm-clock as a source clock, my machine is a very modern x86 with full virtualization support, constant TSC etc..)
Thanks  in adavance                     
Avi



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

end of thread, other threads:[~2016-04-14 18:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-05 15:07 kvm-clock again Avi Cohen
2016-04-05 20:25 ` Radim Krčmář
2016-04-06 13:51   ` Avi Cohen
2016-04-06 14:17     ` Radim Krčmář
2016-04-07  7:09   ` Avi Cohen
2016-04-07 14:20     ` Radim Krčmář
2016-04-08 15:00       ` Avi Cohen
2016-04-13 12:46       ` Avi Cohen
2016-04-14 18:23         ` Radim Krčmář
  -- strict thread matches above, loose matches on Subject: below --
2016-04-05 11:12 Avi Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox