Re: [Qemu-devel] [PATCH] qdev: Fix qdev_try_create() semantics

2012-02-17 Thread Anthony Liguori
On 02/16/2012 08:00 PM, Andreas Färber wrote: Am 17.02.2012 02:47, schrieb Andreas Färber: Since QOM'ification, qdev_try_create() uses object_new() internally, which asserts "type != NULL" when the type is not registered. This was revealed by the combination of kvmclock's kvm_enabled() check and

Re: [Qemu-devel] [PATCH] qdev: Fix qdev_try_create() semantics

2012-02-16 Thread Andreas Färber
Am 17.02.2012 02:47, schrieb Andreas Färber: > Since QOM'ification, qdev_try_create() uses object_new() internally, > which asserts "type != NULL" when the type is not registered. > This was revealed by the combination of kvmclock's kvm_enabled() check > and early QOM type registration. > > Check

[Qemu-devel] [PATCH] qdev: Fix qdev_try_create() semantics

2012-02-16 Thread Andreas Färber
Since QOM'ification, qdev_try_create() uses object_new() internally, which asserts "type != NULL" when the type is not registered. This was revealed by the combination of kvmclock's kvm_enabled() check and early QOM type registration. Check whether the class exists before calling object_new(), so