Am 01.05.2013 18:07, schrieb Andreas Färber:
> 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 subclasses,
> and with the one X86CPU type its global properties are overwritten by models.
> 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
> 
> For changing n270 CPUID flags we'll still need to resort to Eduardo's proposed
> helper functions for now.
> 
> Regards,
> Andreas
> 
> Cc: Eduardo Habkost <ehabk...@redhat.com>
> Cc: Igor Mammedov <imamm...@redhat.com>
> Cc: H. Peter Anvin <h...@zytor.com>
> Cc: Borislav Petkov <b...@suse.de>
> Cc: Anthony Liguori <anth...@codemonkey.ws>
> Cc: Paolo Bonzini <pbonz...@redhat.com>
> Cc: Michael S. Tsirkin <m...@redhat.com>
> 
> Andreas Färber (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

Hearing no veto from Anthony on IRC, I have applied these to qom-cpu
(with helper function renamed):
https://github.com/afaerber/qemu-cpu/commits/qom-cpu

Andreas

> 
>  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(-)
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to