]> Git Repo - qemu.git/commitdiff
kvmclock: Always register type
authorAndreas Färber <[email protected]>
Sun, 4 Mar 2012 20:32:34 +0000 (21:32 +0100)
committerAnthony Liguori <[email protected]>
Tue, 13 Mar 2012 18:23:17 +0000 (13:23 -0500)
Currently, the "kvmclock" type is only registered when kvm_enabled().

This breaks when moving type registration to before command line
parsing (so that QOM types can be used for CPU and machine).

Since the QOM classes are lazy-initialized anyway and kvmclock_create()
has another kvm_enabled() check, simply drop the KVM check in
kvmclock_register_types().

kvm-i8259, kvm-apic and kvm-ioapic do not suffer from such a check.

Reviewed-by: please.
Signed-off-by: Andreas Färber <[email protected]>
Reviewed-by: Jan Kiszka <[email protected]>
Cc: Marcelo Tosatti <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
hw/kvm/clock.c

index 2157340326f21b8a12f2552b690e324e05446833..446bd621767a6d75d852e34eb6fc38d99034af50 100644 (file)
@@ -121,9 +121,7 @@ void kvmclock_create(void)
 
 static void kvmclock_register_types(void)
 {
-    if (kvm_enabled()) {
     type_register_static(&kvmclock_info);
-    }
 }
 
 type_init(kvmclock_register_types)
This page took 0.026588 seconds and 4 git commands to generate.