qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/3] target-i386: save/restore vcpu's TSC rate during migration
@ 2015-10-20  7:22 Haozhong Zhang
  2015-10-20  7:22 ` [Qemu-devel] [PATCH v2 1/3] target-i386: add a subsection for migrating vcpu's TSC rate Haozhong Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Haozhong Zhang @ 2015-10-20  7:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Haozhong Zhang, Eduardo Habkost, kvm, Michael S. Tsirkin,
	Marcelo Tosatti, Paolo Bonzini, afaerber, Richard Henderson

This patchset enables QEMU to save/restore vcpu's TSC rate during the
migration. When cooperating with KVM which supports TSC scaling, guest
programs can observe a consistent guest TSC rate even though they are
migrated among machines with different host TSC rates.

A pair of cpu options 'save-tsc-freq' and 'load-tsc-freq' are added to
control the migration of vcpu's TSC rate.
 * By default, the migration of vcpu's TSC rate is enabled only on
   pc-*-2.5 and newer machine types. If the cpu option 'save-tsc-freq'
   is present, the vcpu's TSC rate will be migrated from older machine
   types as well.
 * Another cpu option 'load-tsc-freq' controls whether the migrated
   vcpu's TSC rate is used. By default, QEMU will not use the migrated
   TSC rate if this option is not present. Otherwise, QEMU will use
   the migrated TSC rate and override the TSC rate given by the cpu
   option 'tsc-freq'.

Changes in v2:
 * Add a pair of cpu options 'save-tsc-freq' and 'load-tsc-freq' to
   control the migration of vcpu's TSC rate.
 * Move all logic of setting TSC rate to target-i386.
 * Remove the duplicated TSC setup in kvm_arch_init_vcpu().

Haozhong Zhang (3):
  target-i386: add a subsection for migrating vcpu's TSC rate
  target-i386: calculate vcpu's TSC rate to be migrated
  target-i386: load the migrated vcpu's TSC rate

 include/hw/i386/pc.h  |  5 +++++
 target-i386/cpu.c     |  2 ++
 target-i386/cpu.h     |  3 +++
 target-i386/kvm.c     | 61 +++++++++++++++++++++++++++++++++++++++++++--------
 target-i386/machine.c | 19 ++++++++++++++++
 5 files changed, 81 insertions(+), 9 deletions(-)

-- 
2.4.8

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

end of thread, other threads:[~2015-10-27  1:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-20  7:22 [Qemu-devel] [PATCH v2 0/3] target-i386: save/restore vcpu's TSC rate during migration Haozhong Zhang
2015-10-20  7:22 ` [Qemu-devel] [PATCH v2 1/3] target-i386: add a subsection for migrating vcpu's TSC rate Haozhong Zhang
2015-10-20  7:22 ` [Qemu-devel] [PATCH v2 2/3] target-i386: calculate vcpu's TSC rate to be migrated Haozhong Zhang
2015-10-20  7:22 ` [Qemu-devel] [PATCH v2 3/3] target-i386: load the migrated vcpu's TSC rate Haozhong Zhang
2015-10-22 18:11   ` Eduardo Habkost
2015-10-23  3:04     ` Haozhong Zhang
2015-10-23  3:14     ` Haozhong Zhang
2015-10-23 14:58       ` Eduardo Habkost
2015-10-26  2:09         ` haozhong.zhang
2015-10-22 18:45 ` [Qemu-devel] [PATCH v2 0/3] target-i386: save/restore vcpu's TSC rate during migration Eduardo Habkost
2015-10-23  2:27   ` Haozhong Zhang
2015-10-23 14:45     ` Eduardo Habkost
2015-10-26  2:09       ` haozhong.zhang
2015-10-26 18:41         ` Eduardo Habkost
2015-10-27  1:09           ` haozhong.zhang
2015-10-23 10:35   ` Marcelo Tosatti
2015-10-23 12:22     ` Eduardo Habkost
2015-10-23 12:45     ` Haozhong Zhang

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