[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/2] RFC: Precise TSC migration

From: Maxim Levitsky
Subject: [PATCH 0/2] RFC: Precise TSC migration
Date: Mon, 30 Nov 2020 15:38:43 +0200

Note that to use this feature you need the kernel patches which are
posted to LKML and kvm@vger.kernel.org

Currently the feature is disabled by default, and enabled with
x-precise-tsc cpu feature.

Also I changed the TSC and TSC adjust read/write code to go though a special
function kvm_get_tsc/kvm_set_tsc regardless of enablement of this feature.

The side effect of this is that now we upload to the kernel the TSC_ADJUST
msr only on KVM_PUT_RESET_STATE reset level.
This shouldn't matter as I don't think that qemu changes this msr on its own.

For migration I added new state field 'tsc_nsec_info', where I save the
'nsec since epoch' timestamp, which is the only new thing that was added to the
migration state.

First patch in this series is temporary and it just updates the kernel
headers to make qemu compile.

When the feature is merged to the kernel, a kernel header sync will bring
the same changes to the qemu, making this patch unnecessary.

Best regards,
    Maxim Levitsky

Maxim Levitsky (2):
  Update the kernel headers for 5.10-rc5 + TSC
  Implement support for precise TSC migration

 include/standard-headers/asm-x86/kvm_para.h |   1 +
 linux-headers/asm-x86/kvm.h                 |   2 +
 linux-headers/linux/kvm.h                   |  70 +++++++++-
 target/i386/cpu.c                           |   1 +
 target/i386/cpu.h                           |   4 +
 target/i386/kvm.c                           | 141 ++++++++++++++++----
 target/i386/machine.c                       |  20 +++
 7 files changed, 211 insertions(+), 28 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]