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:
		
							parent
							
								
									35d7ace74b
								
							
						
					
					
						commit
						cf7d3e64bf
					
				| @ -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); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jan Kiszka
						Jan Kiszka