Skip to content

RFC cpus: make "-cpu cpux, features" global properties

Igor Mammedov qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 41 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8target-i386: cpu: move features logic that requires CPUState to realize timetarget-i386/cpu.c+18 -1810 replies
2/8target-i386: cpu: move xcc->kvm_required check to reaize timetarget-i386/cpu.c+7 -72 replies
3/8target-i386: cpu: use cpu_generic_init() in cpu_x86_init()target-i386/cpu.c+1 -191 reply
4/8target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestrtarget-i386/cpu.c+17 -1512 replies
5/8target-sparc: cpu: use sparc_cpu_parse_features() directlytarget-sparc/cpu.c+4 -30 replies
6/8cpu: use CPUClass->parse_features() as convertor to global propertieshw/arm/virt.c include/qom/cpu.h qom/cpu.c +1 more+41 -223 replies
7/8arm: virt: parse cpu_model only oncehw/arm/virt.c+21 -210 replies
8/8pc: parse cpu features only oncehw/i386/pc.c target-i386/cpu.c target-i386/cpu.h+28 -540 replies

Reviews trailers per patch

2 of 8 patches have a Reviewed-by or Acked-by.

PatchEduardo HabkostEric Blake
1/8
2/8
3/8R-b
4/8R-b
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-arm] [PATCH RFC 0/8] cpus: make "-cpu cpux, features" global properties

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(-)
Signature · 1 line
1.8.3.1