qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/3] target-i386: save/restore vcpu's TSC rate during migration
@ 2015-11-02  9:26 Haozhong Zhang
  2015-11-02  9:26 ` [Qemu-devel] [PATCH v3 1/3] target-i386: add a subsection for migrating vcpu's TSC rate Haozhong Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Haozhong Zhang @ 2015-11-02  9:26 UTC (permalink / raw)
  To: qemu-devel, Eduardo Habkost, Dr. David Alan Gilbert
  Cc: Peter Maydell, James Hogan, kvm, Michael S. Tsirkin,
	Marcelo Tosatti, Alexander Graf, Christian Borntraeger, qemu-ppc,
	Haozhong Zhang, Cornelia Huck, Paolo Bonzini, Leon Alrae,
	Aurelien Jarno, Richard Henderson

This patchset enables QEMU to save/restore vcpu's TSC rate during the
migration on machine types pc-*-2.5 or newer.

On the source machine:
 * If the vcpu's TSC rate is specified by the cpu option 'tsc-freq',
   then this user-specified TSC rate will be migrated.
 * Otherwise, the TSC rate returned by KVM_GET_TSC_KHZ will be
   migrated. For a fresh VM, this is the host TSC rate.

On the destination machine:
 * If the vcpu's TSC rate is specified by the cpu option 'tsc-freq',
   then QEMU will try to use this user-specified TSC rate rather than
   the migrated value.
 * Otherwise, QEMU will try to use the migrated TSC rate. If KVM on
   the destination supports TSC scaling, guest programs will observe a
   consistent TSC rate across the migration. If TSC scaling is not
   supported, the migration will not be aborted and QEMU will behave
   like before, i.e using the host TSC rate instead.

Changes in v3:
 * Change the cpu option 'save-tsc-freq' to an internal flag.
 * Remove the cpu option 'load-tsc-freq' and change the logic of
   loading the migrated TSC rate as above.
 * Move the setup of migrated TSC rate back to
   do_kvm_cpu_synchronize_post_init().

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

 hw/i386/pc.c          |  1 +
 hw/i386/pc_piix.c     |  1 +
 hw/i386/pc_q35.c      |  1 +
 include/hw/i386/pc.h  |  1 +
 include/sysemu/kvm.h  |  2 ++
 kvm-all.c             |  1 +
 target-arm/kvm.c      |  5 +++++
 target-i386/cpu.h     |  1 +
 target-i386/kvm.c     | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++
 target-i386/machine.c | 21 ++++++++++++++++++++
 target-mips/kvm.c     |  5 +++++
 target-ppc/kvm.c      |  5 +++++
 target-s390x/kvm.c    |  5 +++++
 13 files changed, 103 insertions(+)

-- 
2.4.8

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

end of thread, other threads:[~2015-11-16  0:11 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-02  9:26 [Qemu-devel] [PATCH v3 0/3] target-i386: save/restore vcpu's TSC rate during migration Haozhong Zhang
2015-11-02  9:26 ` [Qemu-devel] [PATCH v3 1/3] target-i386: add a subsection for migrating vcpu's TSC rate Haozhong Zhang
2015-11-11 14:16   ` Eduardo Habkost
2015-11-11 14:27     ` Haozhong Zhang
2015-11-13  2:23       ` Haozhong Zhang
2015-11-13 15:21         ` Eduardo Habkost
2015-11-16  0:10           ` Haozhong Zhang
2015-11-02  9:26 ` [Qemu-devel] [PATCH v3 2/3] target-i386: calculate vcpu's TSC rate to be migrated Haozhong Zhang
2015-11-02  9:40   ` James Hogan
2015-11-02 13:26     ` Haozhong Zhang
2015-11-05  8:05     ` Christian Borntraeger
2015-11-05  8:14       ` Haozhong Zhang
2015-11-04 21:42   ` Eduardo Habkost
2015-11-05  1:30     ` Haozhong Zhang
2015-11-05 16:05       ` Eduardo Habkost
2015-11-06  2:32         ` haozhong.zhang
2015-11-06 15:12           ` Eduardo Habkost
2015-11-09  0:33             ` haozhong.zhang
2015-11-09 16:01               ` Eduardo Habkost
2015-11-09 16:37                 ` Dr. David Alan Gilbert
2015-11-10  1:08                 ` Haozhong Zhang
2015-11-11 14:54                   ` Eduardo Habkost
2015-11-11 15:35                     ` Haozhong Zhang
2015-11-10 16:57                 ` Haozhong Zhang
2015-11-11 15:23                   ` Eduardo Habkost
2015-11-11 15:33                     ` Haozhong Zhang
2015-11-02  9:26 ` [Qemu-devel] [PATCH v3 3/3] target-i386: load the migrated vcpu's TSC rate Haozhong Zhang
2015-11-05 16:10   ` Eduardo Habkost
2015-11-06  2:32     ` Haozhong Zhang
2015-11-06 15:15       ` Eduardo Habkost

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