From patchwork Thu Mar 17 22:42:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 642491 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2HMgWsR007363 for ; Thu, 17 Mar 2011 22:42:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755487Ab1CQWm1 (ORCPT ); Thu, 17 Mar 2011 18:42:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16316 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755499Ab1CQWmR (ORCPT ); Thu, 17 Mar 2011 18:42:17 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2HMgGWI008621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 17 Mar 2011 18:42:16 -0400 Received: from mothafucka.localdomain (ovpn-113-137.phx2.redhat.com [10.3.113.137]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2HMg8Mw016845; Thu, 17 Mar 2011 18:42:15 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: qemu-devel@nongnu.org, avi@redhat.com, mtosatti@redhat.com Subject: [PATCH 3/3] don't create kvmclock when one of the flags are present. Date: Thu, 17 Mar 2011 19:42:07 -0300 Message-Id: <1300401727-5235-4-git-send-email-glommer@redhat.com> In-Reply-To: <1300401727-5235-1-git-send-email-glommer@redhat.com> References: <1300401727-5235-1-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 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, 17 Mar 2011 22:42:32 +0000 (UTC) diff --git a/hw/kvmclock.c b/hw/kvmclock.c index b6ceddf..004c4ad 100644 --- a/hw/kvmclock.c +++ b/hw/kvmclock.c @@ -103,7 +103,11 @@ static SysBusDeviceInfo kvmclock_info = { void kvmclock_create(void) { if (kvm_enabled() && - first_cpu->cpuid_kvm_features & (1ULL << KVM_FEATURE_CLOCKSOURCE)) { + first_cpu->cpuid_kvm_features & ((1ULL << KVM_FEATURE_CLOCKSOURCE) +#ifdef KVM_FEATURE_CLOCKSOURCE2 + || (1ULL << KVM_FEATURE_CLOCKSOURCE2) +#endif + )) { sysbus_create_simple("kvmclock", -1, NULL); } }