public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Question on rdtsc instruction in guest
@ 2020-01-16 21:39 Spoorti Doddamani
  2020-01-16 23:44 ` Sean Christopherson
  0 siblings, 1 reply; 2+ messages in thread
From: Spoorti Doddamani @ 2020-01-16 21:39 UTC (permalink / raw)
  To: kvm

Hi,

I would like to know how rdtsc instruction works when executed in
guest. The guest uses kvm-clock for timekeeping. The tsc_timestamp
field in the shared page between the hypervisor and guest is updated
constantly by the hypervisor. Does rdtsc instruction, when executed in
guest, read the value from this shared page? Or does it read the
hardware TSC MSR register? If it reads from the hardware TSC MSR
register why do I observe different values of TSC when executed in
host and guest? Or is the instruction emulated by the hypervisor?



Thanks

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

end of thread, other threads:[~2020-01-16 23:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-16 21:39 Question on rdtsc instruction in guest Spoorti Doddamani
2020-01-16 23:44 ` Sean Christopherson

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