lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 9 Sep 2012 15:10:50 +0000
From:	"Liu, Jinsong" <jinsong.liu@...el.com>
To:	Avi Kivity <avi@...hat.com>
CC:	Marcelo Tosatti <mtosatti@...hat.com>, kvm <kvm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] KVM: tsc deadline timer works only when hrtimer high
 resolution configured

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

===============
>From e6c2a80d3111cc6fb992d78b242619706d99bc6b Mon Sep 17 00:00:00 2001
From: Liu, Jinsong <jinsong.liu@...el.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@...el.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:
-- 
1.7.1

Download attachment "0001-KVM-KVM-enable-depends-on-HIGH_RES_TIMERS.patch" of type "application/octet-stream" (1003 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ