rpms/kernel/F-10 linux-2.6-kvmclock-unsync-tsc-workaround.patch, NONE, 1.1.2.2 kernel.spec, 1.1206.2.17, 1.1206.2.18

Chuck Ebbert cebbert at fedoraproject.org
Fri Feb 6 20:41:03 UTC 2009


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25469

Modified Files:
      Tag: private-fedora-10-2_6_27
	kernel.spec 
Added Files:
      Tag: private-fedora-10-2_6_27
	linux-2.6-kvmclock-unsync-tsc-workaround.patch 
Log Message:
Copy kvmclock fix from our 2.6.29 kernel.

linux-2.6-kvmclock-unsync-tsc-workaround.patch:

--- NEW FILE linux-2.6-kvmclock-unsync-tsc-workaround.patch ---
>From 05d073827d82d7fa29aff7a35279650b8feb6f75 Mon Sep 17 00:00:00 2001
From: Glauber Costa <glommer at redhat.com>
Date: Thu, 29 Jan 2009 12:39:22 -0500
Subject: [PATCH] Disable kvmclock for non constant tsc cpus.

Currently, this code path is posing us big troubles,
and we won't have a decent patch in time. So, temporarily
disable it.

See:

  https://bugzilla.redhat.com/475598

There's a module parameter for the adventurous who want to force
it.

Signed-off-by: Glauber Costa <glommer at redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti at redhat.com>
[backport to 2.6.27 by cebbert at redhat.com]
---
 arch/x86/kvm/x86.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index cc17546..2e22ac9 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -868,6 +868,9 @@ out:
 	return r;
 }
 
+static int force_kvmclock = 0;
+module_param(force_kvmclock, bool, 0644);
+
 int kvm_dev_ioctl_check_extension(long ext)
 {
 	int r;
@@ -879,7 +882,6 @@ int kvm_dev_ioctl_check_extension(long ext)
 	case KVM_CAP_USER_MEMORY:
 	case KVM_CAP_SET_TSS_ADDR:
 	case KVM_CAP_EXT_CPUID:
-	case KVM_CAP_CLOCKSOURCE:
 	case KVM_CAP_PIT:
 	case KVM_CAP_NOP_IO_DELAY:
 	case KVM_CAP_MP_STATE:
@@ -901,6 +903,9 @@ int kvm_dev_ioctl_check_extension(long ext)
 	case KVM_CAP_PV_MMU:
 		r = !tdp_enabled;
 		break;
+	case KVM_CAP_CLOCKSOURCE:
+		r = force_kvmclock || boot_cpu_has(X86_FEATURE_CONSTANT_TSC);
+		break;
 	default:
 		r = 0;
 		break;
-- 
1.6.1



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1206.2.17
retrieving revision 1.1206.2.18
diff -u -r1.1206.2.17 -r1.1206.2.18
--- kernel.spec	5 Feb 2009 05:01:54 -0000	1.1206.2.17
+++ kernel.spec	6 Feb 2009 20:40:33 -0000	1.1206.2.18
@@ -703,9 +703,12 @@
 
 Patch2031: linux-2.6-net-qla-silence-debug-printks.patch
 
+# kvmclock is broken with unsync TSC (#475598)
+Patch2040: linux-2.6-kvmclock-unsync-tsc-workaround.patch
+
 # olpc fixes
-Patch2041: linux-2.6-olpc-touchpad.patch
-Patch2042: linux-2.6-quieter-mmc.patch
+Patch2141: linux-2.6-olpc-touchpad.patch
+Patch2142: linux-2.6-quieter-mmc.patch
 
 # linux1394 git patches
 Patch2200: linux-2.6-firewire-git-update.patch
@@ -1321,6 +1324,9 @@
 
 ApplyPatch linux-2.6-net-qla-silence-debug-printks.patch
 
+# kvmclock is broken with unsync TSC (#475598)
+ApplyPatch linux-2.6-kvmclock-unsync-tsc-workaround.patch
+
 ApplyPatch linux-2.6-olpc-touchpad.patch
 ApplyPatch linux-2.6-quieter-mmc.patch
 
@@ -1939,6 +1945,9 @@
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
+* Fri Feb 07 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.27.15-170.2.18.rc1
+- Copy kvmclock fix from our 2.6.29 kernel.
+
 * Wed Feb 04 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.27.15-170.2.17.rc1
 - libata: detect modern CF devices properly
 - libata: drop link speed when errors happen on reset (#483351)




More information about the scm-commits mailing list