From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyMmY-00007o-Eg for qemu-devel@nongnu.org; Fri, 17 Feb 2012 07:19:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyMmS-00087F-LS for qemu-devel@nongnu.org; Fri, 17 Feb 2012 07:19:22 -0500 Received: from cantor2.suse.de ([195.135.220.15]:60277 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyMmS-00085Z-AR for qemu-devel@nongnu.org; Fri, 17 Feb 2012 07:19:16 -0500 Message-ID: <4F3E45C2.6000702@suse.de> Date: Fri, 17 Feb 2012 13:19:14 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1329442328-13318-1-git-send-email-afaerber@suse.de> <4F3E1EE9.4080508@siemens.com> In-Reply-To: <4F3E1EE9.4080508@siemens.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] kvmclock: Always register type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Marcelo Tosatti , "qemu-devel@nongnu.org" Am 17.02.2012 10:33, schrieb Jan Kiszka: > On 2012-02-17 02:32, Andreas F=C3=A4rber 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=C3=A4rber >> Cc: Jan Kiszka >> Cc: Marcelo Tosatti >> --- >> 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) >> =20 >> static void kvmclock_register_types(void) >> { >> - if (kvm_enabled()) { >> type_register_static(&kvmclock_info); >> - } >> } >> =20 >> type_init(kvmclock_register_types) >=20 > Reviewed-by: Jan Kiszka >=20 > uq/master stuff or do other changes need it earlier? Yes, uq/master will be fine. Thanks. I'll prepend it to my qom-cpu branch for now, but since that's getting rather large for my taste (50+), I'm pushing independent bits out early. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg