Message ID | 1330893156-26569-2-git-send-email-afaerber@suse.de |
---|---|
State | New |
Headers | show |
On 03/04/2012 10:32 PM, Andreas Färber wrote: > 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. Patch looks good.
Am 05.03.2012 10:23, schrieb Avi Kivity: > On 03/04/2012 10:32 PM, Andreas Färber wrote: >> 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. > > Patch looks good. Ping for series. Avi, do you want to sign this patch off through uq/master? Or should I make the above a Reviewed-by (and remove the Cc:) within this series? Andreas
On 03/10/2012 03:35 AM, Andreas Färber wrote: > Am 05.03.2012 10:23, schrieb Avi Kivity: > > On 03/04/2012 10:32 PM, Andreas Färber wrote: > >> 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. > > > > Patch looks good. > > Ping for series. > > Avi, do you want to sign this patch off through uq/master? Or should I > make the above a Reviewed-by (and remove the Cc:) within this series? > Reviewed-by: please.
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)