summaryrefslogtreecommitdiffstats
path: root/hw/kvm/clock.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-03-04 21:32:34 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2012-03-13 13:23:17 -0500
commit03f48b0797c9904301ee91e0081e89b3a3250f91 (patch)
treee0b9f4c1031b0411deb0d528a4c310bd2eff69f0 /hw/kvm/clock.c
parentcb72b75824c0362e5cb32eb8796930f29fa36d17 (diff)
downloadhqemu-03f48b0797c9904301ee91e0081e89b3a3250f91.zip
hqemu-03f48b0797c9904301ee91e0081e89b3a3250f91.tar.gz
kvmclock: Always register type
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 <afaerber@suse.de> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/kvm/clock.c')
-rw-r--r--hw/kvm/clock.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/hw/kvm/clock.c b/hw/kvm/clock.c
index 2157340..446bd62 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)
OpenPOWER on IntegriCloud