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


Groups > linux.kernel > #1228100

[RFC PATCH 0/2] kvmclock: fix ABI breakage from PVCLOCK_COUNTS_FROM_ZERO.

From Radim Krčmář <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject [RFC PATCH 0/2] kvmclock: fix ABI breakage from PVCLOCK_COUNTS_FROM_ZERO.
Date 2015-09-18 18:00 +0200
Message-ID <qa6eR-75X-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


This patch series will be disabling PVCLOCK_COUNTS_FROM_ZERO flag and is
RFC because I haven't explored many potential problems or tested it.

[1/2] uses a different algorithm in the guest to start counting from 0.
[2/2] stops exposing PVCLOCK_COUNTS_FROM_ZERO in the hypervisor.

A viable alternative would be to implement opt-in features in kvm clock.

And because we probably only broke one old user (the infamous SLES 10), a
workaround like this is also possible: (but I'd rather not do that)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index a60bdbccff51..ae9049248aaf 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2007,7 +2007,8 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 
 			ka->boot_vcpu_runs_old_kvmclock = tmp;
 
-			ka->kvmclock_offset = -get_kernel_ns();
+			if (!ka->boot_vcpu_runs_old_kvmclock)
+				ka->kvmclock_offset = -get_kernel_ns();
 		}
 
 		vcpu->arch.time = data;


Radim Krčmář (2):
  x86: kvmclock: abolish PVCLOCK_COUNTS_FROM_ZERO
  Revert "KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock
    system MSR"

 arch/x86/include/asm/pvclock-abi.h |  1 +
 arch/x86/kernel/kvmclock.c         | 46 +++++++++++++++++++++++++++++---------
 arch/x86/kvm/x86.c                 |  4 ----
 3 files changed, 36 insertions(+), 15 deletions(-)

-- 
2.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[RFC PATCH 0/2] kvmclock: fix ABI breakage from PVCLOCK_COUNTS_FROM_ZERO. Radim Krčmář <rkrcmar@redhat.com> - 2015-09-18 18:00 +0200
  Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from  PVCLOCK_COUNTS_FROM_ZERO. Marcelo Tosatti <mtosatti@redhat.com> - 2015-09-21 01:00 +0200
    Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from  PVCLOCK_COUNTS_FROM_ZERO. Radim Krčmář <rkrcmar@redhat.com> - 2015-09-21 17:20 +0200
      Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from  PVCLOCK_COUNTS_FROM_ZERO. Radim Krčmář <rkrcmar@redhat.com> - 2015-09-21 17:50 +0200
      Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from  PVCLOCK_COUNTS_FROM_ZERO. Marcelo Tosatti <mtosatti@redhat.com> - 2015-09-21 18:00 +0200
        Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from  PVCLOCK_COUNTS_FROM_ZERO. Radim Krčmář <rkrcmar@redhat.com> - 2015-09-21 22:10 +0200
          Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from  PVCLOCK_COUNTS_FROM_ZERO. Marcelo Tosatti <mtosatti@redhat.com> - 2015-09-21 23:00 +0200
            Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from  PVCLOCK_COUNTS_FROM_ZERO. Radim Krčmář <rkrcmar@redhat.com> - 2015-09-22 00:10 +0200
              Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from  PVCLOCK_COUNTS_FROM_ZERO. Marcelo Tosatti <mtosatti@redhat.com> - 2015-09-22 00:40 +0200
                Re: [RFC PATCH 0/2] kvmclock: fix ABI breakage from  PVCLOCK_COUNTS_FROM_ZERO. Marcelo Tosatti <mtosatti@redhat.com> - 2015-09-22 02:50 +0200

csiph-web