Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1254648

Re: [PATCH v2 00/12] KVM: x86: add support for VMX TSC scaling

From Haozhong Zhang <haozhong.zhang@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 00/12] KVM: x86: add support for VMX TSC scaling
Date 2015-10-23 16:40 +0200
Message-ID <qmLFE-4cC-31@gated-at.bofh.it> (permalink)
References <qlzQe-5Bb-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Following is how I test this patchset. It should also apply to AMD
machines by replacing Intel with AMD and VMX TSC scaling with SVM TSC
ratio.

* Hardware Requirements
  1) Two machines with Intel CPUs, called M_A and M_B below.
  2) TSC frequency of CPUs on M_A is different from CPUs on M_B.
     Suppose TSC frequency on M_A is f_a KHz.
  3) At least CPUs on M_B support VMX TSC scaling.

* Software Requirements
  1) Apply this patchset to KVM on both machines.
  2) Apply QEMU patches[1] to QEMU commit 40fe17b on both machines

* Test Process
  1) Start a linux guest on M_A
       qemu-system-x86_64 -enable-kvm -smp 4 -cpu qemu66 -m 512 -hda linux.img
       
  2) In guest linux, check the TSC frequency detected by Linux kernel.
     e.g. search in dmeg for messages like
       "tsc: Detected XYZ.ABC MHz processor" or
       "tsc: Refined TSC clocksource calibration: XYZ.ABC MHz"
  
  3) Start QEMU waiting for migration on M_B:
       qemu-system-x86_64 -enable-kvm -smp 4 -cpu qemu64,load-tsc-freq -m 512 -hda linux.img -incoming tcp:0:1234
       
  4) Migrate above VM to M_B as normal in QEMU monitor:
       migrate tcp:<M_B's ip>:1234
       
  5) After the migration, if VMX TSC scaling and this patchset work on
     M_B, no messages like
       "Clocksource tsc unstable (delta = xxxxx ns)"
     should appear in dmesg of guest linux

  6) Furthermore, users can also check whether guest TSC after the
     migration increases in the same rate as before by running the
     attached program test_tsc in VM:
       ./test_tsc N f_a
     It measures the number of TSC ticks passed in N seconds, and
     divides it by the expected TSC frequency f_a to get the output
     result. If this patchset works, the output should be very closed
     to N
  
[1] http://www.spinics.net/lists/kvm/msg122421.html

Thanks,
Haozhong

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/12] KVM: x86: add support for VMX TSC scaling Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-20 09:50 +0200
  [PATCH v2 09/12] KVM: VMX: Enable and initialize VMX TSC scaling Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-20 09:50 +0200
  [PATCH v2 03/12] KVM: x86: Add a common TSC scaling function Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-20 09:50 +0200
  [PATCH v2 02/12] KVM: x86: Add a common TSC scaling ratio field in kvm_vcpu_arch Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-20 09:50 +0200
  [PATCH v2 12/12] KVM: VMX: Dump TSC multiplier in dump_vmcs() Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-20 09:50 +0200
  [PATCH v2 06/12] KVM: x86: Move TSC scaling logic out of call-back adjust_tsc_offset() Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-20 09:50 +0200
  [PATCH v2 11/12] KVM: VMX: Use a scaled host TSC for guest readings of MSR_IA32_TSC Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-20 10:00 +0200
  [PATCH v2 01/12] KVM: x86: Collect information for setting TSC scaling ratio Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-20 10:00 +0200
  [PATCH v2 05/12] KVM: x86: Replace call-back compute_tsc_offset() with a common function Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-20 10:00 +0200
  [PATCH v2 04/12] KVM: x86: Replace call-back set_tsc_khz() with a common function Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-20 10:00 +0200
  Re: [PATCH v2 00/12] KVM: x86: add support for VMX TSC scaling Joerg Roedel <joro@8bytes.org> - 2015-10-23 12:10 +0200
    Re: [PATCH v2 00/12] KVM: x86: add support for VMX TSC scaling Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-23 14:40 +0200
      Re: [PATCH v2 00/12] KVM: x86: add support for VMX TSC scaling Joerg Roedel <joro@8bytes.org> - 2015-10-23 14:50 +0200
        Re: [PATCH v2 00/12] KVM: x86: add support for VMX TSC scaling Paolo Bonzini <pbonzini@redhat.com> - 2015-10-23 15:00 +0200
          Re: [PATCH v2 00/12] KVM: x86: add support for VMX TSC scaling Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-23 16:40 +0200
        Re: [PATCH v2 00/12] KVM: x86: add support for VMX TSC scaling Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-23 15:00 +0200
  Re: [PATCH v2 00/12] KVM: x86: add support for VMX TSC scaling Haozhong Zhang <haozhong.zhang@intel.com> - 2015-10-23 16:40 +0200

csiph-web