From patchwork Sun Sep 9 15:10:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liu, Jinsong" X-Patchwork-Id: 1427811 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 6F655DF280 for ; Sun, 9 Sep 2012 15:11:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754037Ab2IIPKz (ORCPT ); Sun, 9 Sep 2012 11:10:55 -0400 Received: from mga09.intel.com ([134.134.136.24]:25746 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752989Ab2IIPKy (ORCPT ); Sun, 9 Sep 2012 11:10:54 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 09 Sep 2012 08:10:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,394,1344236400"; d="scan'208,223";a="190866430" Received: from fmsmsx108.amr.corp.intel.com ([10.19.9.228]) by orsmga001.jf.intel.com with ESMTP; 09 Sep 2012 08:10:53 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX108.amr.corp.intel.com (10.19.9.228) with Microsoft SMTP Server (TLS) id 14.1.355.2; Sun, 9 Sep 2012 08:10:52 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.175]) with mapi id 14.01.0355.002; Sun, 9 Sep 2012 23:10:51 +0800 From: "Liu, Jinsong" To: Avi Kivity CC: Marcelo Tosatti , kvm , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] KVM: tsc deadline timer works only when hrtimer high resolution configured Thread-Topic: [PATCH] KVM: tsc deadline timer works only when hrtimer high resolution configured Thread-Index: AQHNjpuwEaLQ0dDCRmG5O7fBmMDyI5eCHJhw Date: Sun, 9 Sep 2012 15:10:50 +0000 Message-ID: References: <5048AC08.5050100@redhat.com> <504CA787.2000905@redhat.com> <504CAEC7.9000807@redhat.com> In-Reply-To: <504CAEC7.9000807@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 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 --- 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: