From patchwork Thu Jun 23 08:23:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 908462 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5N8LsP4027623 for ; Thu, 23 Jun 2011 08:24:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755340Ab1FWIXP (ORCPT ); Thu, 23 Jun 2011 04:23:15 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:50781 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754769Ab1FWIXM (ORCPT ); Thu, 23 Jun 2011 04:23:12 -0400 Received: from smtp06.web.de ( [172.20.5.172]) by fmmailgate01.web.de (Postfix) with ESMTP id 1F243191F4239; Thu, 23 Jun 2011 10:23:11 +0200 (CEST) Received: from [88.65.252.133] (helo=mchn199C.mchp.siemens.de) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1QZfBv-0001f2-00; Thu, 23 Jun 2011 10:23:11 +0200 Message-ID: <4E02F7EE.6050000@web.de> Date: Thu, 23 Jun 2011 10:23:10 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Avi Kivity , Marcelo Tosatti CC: kvm , qemu-devel , Glauber Costa Subject: [PATCH][uq/master] kvmclock: Fix feature detection X-Enigmail-Version: 1.1.2 X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX198OOR605qqddb4ghIMJgwfxl5Yfx62A7Dam+9X tWpx7oFmSDxjba/BfoUBapO55IkyDRLc8POq7SPqE0eKMui3Yt t3U5gHTn4= Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 23 Jun 2011 08:24:05 +0000 (UTC) From: Jan Kiszka Bit-wise or the feature flags and drop the obsolete #ifdef. Signed-off-by: Jan Kiszka --- hw/kvmclock.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/kvmclock.c b/hw/kvmclock.c index 692ad18..b73aec4 100644 --- a/hw/kvmclock.c +++ b/hw/kvmclock.c @@ -101,11 +101,8 @@ static SysBusDeviceInfo kvmclock_info = { void kvmclock_create(void) { if (kvm_enabled() && - first_cpu->cpuid_kvm_features & ((1ULL << KVM_FEATURE_CLOCKSOURCE) -#ifdef KVM_FEATURE_CLOCKSOURCE2 - || (1ULL << KVM_FEATURE_CLOCKSOURCE2) -#endif - )) { + first_cpu->cpuid_kvm_features & ((1ULL << KVM_FEATURE_CLOCKSOURCE) | + (1ULL << KVM_FEATURE_CLOCKSOURCE2))) { sysbus_create_simple("kvmclock", -1, NULL); } }