From: Glauber Costa Date: Thu, 17 Mar 2011 22:42:07 +0000 (-0300) Subject: kvm: create kvmclock when one of the flags are present X-Git-Tag: v0.15.0-rc0~321 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=450fb75c478aa4134bc1e6b1655791c0a39ad141;p=thirdparty%2Fqemu.git kvm: create kvmclock when one of the flags are present kvmclock presence can be signalled by two different flags. So for device creation, we have to test for both. Signed-off-by: Glauber Costa Signed-off-by: Avi Kivity --- diff --git a/hw/kvmclock.c b/hw/kvmclock.c index b6ceddfba62..004c4add8c8 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); } }