]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/cpu.c
target-i386: Separate feature string parsing from CPU model lookup
authorEduardo Habkost <ehabkost@redhat.com>
Tue, 4 Dec 2012 19:34:39 +0000 (17:34 -0200)
committerAndreas Färber <afaerber@suse.de>
Thu, 6 Dec 2012 08:17:05 +0000 (09:17 +0100)
commit8f961357d06a0beeb7d3efbde1d754d82ff6a300
treef9dc22babe34a646edf63b8c401b27ad2b7dd9e8
parent9f3fb5657b2133a408ccf40b4ab57dec9b4ce771
target-i386: Separate feature string parsing from CPU model lookup

Instead of parsing the whole cpu_model string inside
cpu_x86_find_by_name(), first split it into the CPU model name and the
full feature string, then parse the feature string into pieces.

When using CPU model classes, those two pieces of information will be
used at different moments (CPU model name will be used to find CPU
class, feature string will be used after CPU object was created), so
making the split in two steps will make it easier to refactor the code
later.

This should also help on the CPU properties work, that will just need to
replace the cpu_x86_parse_featurestr() logic (and can keep the CPU model
lookup code as-is).

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
target-i386/cpu.c