summaryrefslogtreecommitdiffstats
path: root/hw/kvmclock.c
diff options
context:
space:
mode:
authorGlauber Costa2011-03-17 23:42:07 +0100
committerMarcelo Tosatti2011-05-02 14:38:35 +0200
commit450fb75c478aa4134bc1e6b1655791c0a39ad141 (patch)
tree7bd2578205611b6802e03ffd2f3f6fec0a599eec /hw/kvmclock.c
parentkvm: add kvmclock to its second bit (diff)
downloadqemu-450fb75c478aa4134bc1e6b1655791c0a39ad141.tar.gz
qemu-450fb75c478aa4134bc1e6b1655791c0a39ad141.tar.xz
qemu-450fb75c478aa4134bc1e6b1655791c0a39ad141.zip
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 <glommer@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/kvmclock.c')
-rw-r--r--hw/kvmclock.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/kvmclock.c b/hw/kvmclock.c
index b6ceddfba6..004c4add8c 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);
}
}