xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* tsc_mode == 1 and hvm guests
@ 2010-05-06 11:41 Stefano Stabellini
  2010-05-06 12:04 ` Keir Fraser
  0 siblings, 1 reply; 17+ messages in thread
From: Stefano Stabellini @ 2010-05-06 11:41 UTC (permalink / raw)
  To: xen-devel

Hi all,
going through the vtsc code in xen I realized that vtsc_offset and, more
importantly, vtsc_to_ns/ns_to_vtsc are never used for hvm guests.
That means that if tsc_mode == 1 the rdtsc values returned to pv guests
and the ones returns to hvm guests are fundamentally different because
in the first case they are scaled by the guest tsc frequency and in the
second case they are not.
The fact that noone at the moment is calling tsc_set_info with gtsc_khz
!= 0 doesn't help spotting this problem.

Is there a reason for this or is it just a bug?

Also there are two gtsc_khz AFAICT: d->arch.tsc_khz and
d->arch.hvm_domain.gtsc_khz, why hvm guests have their own separate
record of the guest tsc frequency, when they never actually change it?

BTW I noticed these problems because they prevent the pvclock algorithm
from working correctly in a PV on HVM linux guest.

Thanks,

Stefano

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

end of thread, other threads:[~2010-05-10 16:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 11:41 tsc_mode == 1 and hvm guests Stefano Stabellini
2010-05-06 12:04 ` Keir Fraser
2010-05-06 15:03   ` Dan Magenheimer
2010-05-07  8:18     ` Zhang, Xiantao
2010-05-07 19:06       ` Stefano Stabellini
2010-05-07 19:35         ` Dan Magenheimer
2010-05-10 12:41           ` Stefano Stabellini
2010-05-10 12:42             ` Keir Fraser
2010-05-10 12:58               ` Stefano Stabellini
2010-05-10 14:47               ` Dan Magenheimer
2010-05-10 14:55                 ` Stefano Stabellini
2010-05-10 15:01                   ` Dan Magenheimer
2010-05-10 15:19                     ` Stefano Stabellini
2010-05-10 15:30                       ` Dan Magenheimer
2010-05-10 16:36                         ` Stefano Stabellini
2010-05-09 14:04         ` Zhang, Xiantao
2010-05-10 12:48           ` Stefano Stabellini

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