From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZfBy-0000wj-4I for qemu-devel@nongnu.org; Thu, 23 Jun 2011 04:23:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZfBw-0003Ay-Dg for qemu-devel@nongnu.org; Thu, 23 Jun 2011 04:23:13 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:50778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZfBw-0003At-1F for qemu-devel@nongnu.org; Thu, 23 Jun 2011 04:23:12 -0400 Message-ID: <4E02F7EE.6050000@web.de> Date: Thu, 23 Jun 2011 10:23:10 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH][uq/master] kvmclock: Fix feature detection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity , Marcelo Tosatti Cc: Glauber Costa , qemu-devel , kvm 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); } } -- 1.7.1