From 03f48b0797c9904301ee91e0081e89b3a3250f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 4 Mar 2012 21:32:34 +0100 Subject: kvmclock: Always register type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jan Kiszka Cc: Marcelo Tosatti Signed-off-by: Anthony Liguori --- hw/kvm/clock.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'hw/kvm/clock.c') diff --git a/hw/kvm/clock.c b/hw/kvm/clock.c index 2157340326..446bd62176 100644 --- a/hw/kvm/clock.c +++ b/hw/kvm/clock.c @@ -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) -- cgit v1.2.1