From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYJ8W-0007Wu-1w for qemu-devel@nongnu.org; Fri, 03 May 2013 12:47:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYJ8S-0003Rb-GP for qemu-devel@nongnu.org; Fri, 03 May 2013 12:47:07 -0400 Received: from mail-ve0-x236.google.com ([2607:f8b0:400c:c01::236]:51933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYJ8S-0003R9-Co for qemu-devel@nongnu.org; Fri, 03 May 2013 12:47:04 -0400 Received: by mail-ve0-f182.google.com with SMTP id jx10so1703418veb.27 for ; Fri, 03 May 2013 09:47:03 -0700 (PDT) From: Anthony Liguori In-Reply-To: <1367424440-16687-1-git-send-email-afaerber@suse.de> References: <1367424440-16687-1-git-send-email-afaerber@suse.de> Date: Fri, 03 May 2013 11:46:59 -0500 Message-ID: <87sj24ko3g.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu for-1.5 0/4] target-i386: X86CPU compatibility properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= , qemu-devel@nongnu.org Cc: ehabkost@redhat.com, "Michael S. Tsirkin" , pbonzini@redhat.com, "H. Peter Anvin" , imammedo@redhat.com, Borislav Petkov Andreas F=C3=A4rber writes: > Hello, > > It's easier adapting the infrastructure to our needs than working around = it: > X86CPU already has QOM properties today. What's lacking is model subclass= es, > and with the one X86CPU type its global properties are overwritten by mod= els. > But we already know the designated naming scheme for the models! > > So let's simply prepare compat_props for CPU models and make sure they are > already picked up today. > > This works just fine for changing the 486 CPUID model value and avoids to > redo the PC part once we have X86CPU subclasses. > Tested using: ./QMP/qom-get /machine/icc-bridge/icc/child[0].model So, what's left to do with subclass modelling? How long are we going to need to carry something like this? It's a clever work around but I'm a bit concerned that it would grow beyond cpu subclasses and that we'd be stuck with it forever. Regards, Anthony Liguori > > For changing n270 CPUID flags we'll still need to resort to Eduardo's pro= posed > helper functions for now. > > Regards, > Andreas > > Cc: Eduardo Habkost > Cc: Igor Mammedov > Cc: H. Peter Anvin > Cc: Borislav Petkov > Cc: Anthony Liguori > Cc: Paolo Bonzini > Cc: Michael S. Tsirkin > > Andreas F=C3=A4rber (4): > qdev: Let qdev_prop_parse() pass through Error > qdev: Introduce qdev_prop_set_custom_globals() > target-i386: Emulate X86CPU subclasses for global properties > target-i386: Change CPUID model of 486 to 8 > > hw/core/qdev-properties.c | 50 ++++++++++++++++++++++++++------------= ------ > hw/core/qdev.c | 7 ++++++- > include/hw/i386/pc.h | 4 ++++ > include/hw/qdev-properties.h | 7 +++++-- > qdev-monitor.c | 6 +++++- > target-i386/cpu.c | 11 +++++++++- > 6 files changed, 60 insertions(+), 25 deletions(-) > > --=20 > 1.8.1.4