mirror of https://github.com/xemu-project/xemu.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 <glommer@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
642258c6c7
commit
450fb75c47
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue