kvmclock: Fix feature detection

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

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Jan Kiszka 2011-06-23 10:23:10 +02:00 committed by Marcelo Tosatti
parent 35d7ace74b
commit cf7d3e64bf

View File

@ -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);
}
}