[PATCH] KVM: select HIGH_RES_TIMERS when KVM enabled
From: Liu , Jinsong
Date: Fri Sep 07 2012 - 15:32:31 EST
This is for 2 reasons:
1. it's pointless for kvm lapic timer and tsc deadline timer
when kernel hrtimer not configured as high resolution, since
that would be not accurate based on wheel;
2. kvm lapic timer and tsc deadline timer based on hrtimer,
setting a leftmost node to rb tree and then do hrtimer reprogram.
If hrtimer not configured as high resolution, hrtimer_enqueue_reprogram
do nothing and then make kvm lapic timer and tsc deadline timer fail.
Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>
---
arch/x86/kvm/Kconfig | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index a28f338..5f861ca 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -24,6 +24,8 @@ config KVM
depends on PCI
# for TASKSTATS/TASK_DELAY_ACCT:
depends on NET
+ # for HIGH_RES_TIMERS
+ depends on !ARCH_USES_GETTIMEOFFSET
select PREEMPT_NOTIFIERS
select MMU_NOTIFIER
select ANON_INODES
@@ -37,6 +39,8 @@ config KVM
select TASK_DELAY_ACCT
select PERF_EVENTS
select HAVE_KVM_MSI
+ select GENERIC_CLOCKEVENTS
+ select HIGH_RES_TIMERS
---help---
Support hosting fully virtualized guest machines using hardware
virtualization extensions. You will need a fairly recent
--=20
1.7.1
--_002_DE8DF0795D48FD4CA783C40EC8292335322311SHSMSX101ccrcorpi_
Content-Type: application/octet-stream;
name="0001-KVM-select-HIGH_RES_TIMERS-when-KVM-enabled.patch"
Content-Description: 0001-KVM-select-HIGH_RES_TIMERS-when-KVM-enabled.patch
Content-Disposition: attachment;
filename="0001-KVM-select-HIGH_RES_TIMERS-when-KVM-enabled.patch"; size=1488;
creation-date="Fri, 07 Sep 2012 11:58:20 GMT";
modification-date="Fri, 07 Sep 2012 19:50:06 GMT"
Content-Transfer-Encoding: base64
RnJvbSA2NGQwNDU4ZW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ZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvYXJjaC94ODYva3ZtL0tjb25maWcgYi9hcmNoL3g4
Ni9rdm0vS2NvbmZpZwppbmRleCBhMjhmMzM4Li41Zjg2MWNhIDEwMDY0NAotLS0gYS9hcmNoL3g4
Ni9rdm0vS2NvbmZpZworKysgYi9hcmNoL3g4Ni9rdm0vS2NvbmZpZwpAQCAtMjQsNiArMjQsOCBA
QCBjb25maWcgS1ZNCiAJZGVwZW5kcyBvbiBQQ0kKIAkjIGZvciBUQVNLU1RBVFMvVEFTS19ERUxB
WV9BQ0NUOgogCWRlcGVuZHMgb24gTkVUCisJIyBmb3IgSElHSF9SRVNfVElNRVJTCisJZGVwZW5k
cyBvbiAhQVJDSF9VU0VTX0dFVFRJTUVPRkZTRVQKIAlzZWxlY3QgUFJFRU1QVF9OT1RJRklFUlMK
IAlzZWxlY3QgTU1VX05PVElGSUVSCiAJc2VsZWN0IEFOT05fSU5PREVTCkBAIC0zNyw2ICszOSw4
IEBAIGNvbmZpZyBLVk0KIAlzZWxlY3QgVEFTS19ERUxBWV9BQ0NUCiAJc2VsZWN0IFBFUkZfRVZF
TlRTCiAJc2VsZWN0IEhBVkVfS1ZNX01TSQorCXNlbGVjdCBHRU5FUklDX0NMT0NLRVZFTlRTCisJ
c2VsZWN0IEhJR0hfUkVTX1RJTUVSUwogCS0tLWhlbHAtLS0KIAkgIFN1cHBvcnQgaG9zdGluZyBm
dWxseSB2aXJ0dWFsaXplZCBndWVzdCBtYWNoaW5lcyB1c2luZyBoYXJkd2FyZQogCSAgdmlydHVh
bGl6YXRpb24gZXh0ZW5zaW9ucy4gIFlvdSB3aWxsIG5lZWQgYSBmYWlybHkgcmVjZW50Ci0tIAox
LjcuMQoK
--_002_DE8DF0795D48FD4CA783C40EC8292335322311SHSMSX101ccrcorpi_--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/