qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH][uq/master] kvmclock: Fix feature detection
@ 2011-06-23  8:23 Jan Kiszka
  2011-07-04 18:37 ` Marcelo Tosatti
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2011-06-23  8:23 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: Glauber Costa, qemu-devel, kvm

From: Jan Kiszka <jan.kiszka@siemens.com>

Bit-wise or the feature flags and drop the obsolete #ifdef.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-04  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-23  8:23 [Qemu-devel] [PATCH][uq/master] kvmclock: Fix feature detection Jan Kiszka
2011-07-04 18:37 ` Marcelo Tosatti
2011-08-04  7:06   ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).