From: Gerd H. <kr...@re...> - 2008-04-11 13:44:40
|
Avi Kivity wrote: > Gerd Hoffmann wrote: >> Hi, >> >> Tried to use kvmclock with xenner and noticed that the kvmclock >> (MSR_KVM_SYSTEM_TIME msr) is incompatible with xen. > > Patches are welcome, especially as kvmclock isn't merged yet, so there > are no backward compatibility issues. Great, so I'll happily go break kvm guests ;) Patch revision #1 attached. It changes the way the tsc-delta-scaling fields are calculated to be compatible with xen. Code is taken from xenner (which got it from xen) and adapted a bit. Host only, kvm guest side not done (yet). With that patch applied xen guests with pv clock enabled happily boot to the login prompt, without complains about time going backwards. Fine. Wall clock is off a few hours though. Oops. I think the way wall clock and system clock work together in xen (Jeremy correct me if I'm wrong) is that the wall clock specifies the point in time where the system clock started going. As kvm fills in host system time into the guest system time fields the guest wall clock fields should be filled with the host boot time timestamp I'd say. Comments? Gerd -- http://kraxel.fedorapeople.org/xenner/ |