diff mbox

KVM: tsc deadline timer works only when hrtimer high resolution configured

Message ID DE8DF0795D48FD4CA783C40EC82923353235C7@SHSMSX101.ccr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Liu, Jinsong Sept. 9, 2012, 3:10 p.m. UTC
Avi Kivity wrote:
> On 09/09/2012 05:54 PM, Liu, Jinsong wrote:
>>> 
>>> hrtimers is an intrusive feature, I don't think we should
>>> force-enable it.  Please change it to a depends on.
>> 
>> Hmm, if it changed as
>> config KVM
>> 	depends on HIGH_RES_TIMERS
>> The item 'Kernel-based Virtual Machine (KVM) support (NEW)' even
>> didn't appear to user when make menuconfig (when HIGH_RES_TIMERS
>> disable)  
>> 
>> Is it good? I just have a little concern here:)
> 
> It's not good, but that's what we have.
> 
> It's okay to force-enable low-impact features (like preempt notifies).
> 
> hrimers, on the other hand, change kernel behaviour quite deeply.
> 
> Maybe over time someone will fix the config tools to unhide features
> that can be enabled by turning on a dependency.

OK, updated as attached.

Thanks,
Jinsong

Comments

Avi Kivity Sept. 10, 2012, 8:10 a.m. UTC | #1
On 09/09/2012 06:10 PM, Liu, Jinsong wrote:
> Avi Kivity wrote:
>> On 09/09/2012 05:54 PM, Liu, Jinsong wrote:
>>>> 
>>>> hrtimers is an intrusive feature, I don't think we should
>>>> force-enable it.  Please change it to a depends on.
>>> 
>>> Hmm, if it changed as
>>> config KVM
>>> 	depends on HIGH_RES_TIMERS
>>> The item 'Kernel-based Virtual Machine (KVM) support (NEW)' even
>>> didn't appear to user when make menuconfig (when HIGH_RES_TIMERS
>>> disable)  
>>> 
>>> Is it good? I just have a little concern here:)
>> 
>> It's not good, but that's what we have.
>> 
>> It's okay to force-enable low-impact features (like preempt notifies).
>> 
>> hrimers, on the other hand, change kernel behaviour quite deeply.
>> 
>> Maybe over time someone will fix the config tools to unhide features
>> that can be enabled by turning on a dependency.
> 
> OK, updated as attached.

Thanks, applied.
diff mbox

Patch

===============
From e6c2a80d3111cc6fb992d78b242619706d99bc6b Mon Sep 17 00:00:00 2001
From: Liu, Jinsong <jinsong.liu@intel.com>
Date: Mon, 10 Sep 2012 06:55:39 +0800
Subject: [PATCH] KVM: KVM enable depends on HIGH_RES_TIMERS

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@intel.com>
---
 arch/x86/kvm/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index a28f338..65657ec 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -20,6 +20,7 @@  if VIRTUALIZATION
 config KVM
 	tristate "Kernel-based Virtual Machine (KVM) support"
 	depends on HAVE_KVM
+	depends on HIGH_RES_TIMERS
 	# for device assignment:
 	depends on PCI
 	# for TASKSTATS/TASK_DELAY_ACCT: