On 2012-02-17 02:32, 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.
> 
> Signed-off-by: Andreas Färber <[email protected]>
> Cc: Jan Kiszka <[email protected]>
> Cc: Marcelo Tosatti <[email protected]>
> ---
>  hw/kvm/clock.c |    2 --
>  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)

Reviewed-by: Jan Kiszka <[email protected]>

uq/master stuff or do other changes need it earlier?

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

Reply via email to