Current CLI option -cpu cpux,features serves as template for all created cpus of type: cpux. However QEMU parses "features" every time it creates a cpu instance and applies them to it while doing parsing.
That doesn't work well with -device/device_add infrastructure as it has no idea about cpu specific hooks that's used for parsing "features". In order to make -device/device_add utilize "-cpu features" template convert it into a set of global properties, so that every new CPU created will have them applied automatically. That also allows to parse features only once, instread of doing it for every CPU instance created. Igor Mammedov (8): target-i386: cpu: move features logic that requires CPUState to realize time target-i386: cpu: move xcc->kvm_required check to reaize time target-i386: cpu: use cpu_generic_init() in cpu_x86_init() target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr target-sparc: cpu: use sparc_cpu_parse_features() directly cpu: use CPUClass->parse_features() as convertor to global properties arm: virt: parse cpu_model only once pc: parse cpu features only once hw/arm/virt.c | 41 +++++++------- hw/i386/pc.c | 37 +++++++++---- include/qom/cpu.h | 2 +- qom/cpu.c | 29 +++++----- target-i386/cpu.c | 155 +++++++++++++++++++---------------------------------- target-i386/cpu.h | 1 - target-sparc/cpu.c | 7 +-- 7 files changed, 125 insertions(+), 147 deletions(-) -- 1.8.3.1