Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
target-i386: set [+-]feature using static properties
* Define static properties for cpuid feature bits
* property names of CPUID feature bits are changed to have "feat-"
prefix, so that it would be easy to distinguish them from other
properties.
* Convert [+-]cpuid_features to a set(QDict) of key, value pairs, where
+foo => (feat-foo, on)
-foo => (feat-foo, off)
[+-] unknown foo => (feat-foo, on/off) - it's expected to be rejected
by property setter later
QDict is used as convinience sturcture to keep '-foo' semantic.
Once all +-foo are parsed, collected features are applied to CPU instance.
* When parsing 'kvmclock' feature, set additional feat-kvmclock2 feature
in cpu_x86_parse_featurestr() to mantain legacy kvmclock flag behavior
* Cleanup unused anymore:
add_flagname_to_bitmaps(), lookup_feature(), altcmp(), sstrcmp(),
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
v8:
- add feat-kvm-pv-unhalt introduced by
f010bc6 "target-i386: add feature kvm_pv_unhalt"
v7:
- fix mispelling "feat-kvm-steal-tm" -> "feat-kvm-steal-time"
- cpu_x86_properties changed to x86_cpu_properties
upstream, rebase on top of it.
v6:
- substitute '_' with '-' for +-foo feature bits as well
- change "f-" feature prefix to "feat-" (req: afaerber)
- replace F_* macros with a single X86CPU_FEAT() macro
- simplify F_XXX macros to set default value to 0, defaults to be handled
in initfn()
- ammend F_XXX macros to use feature-words
- kvmclock fix endless loop on compat kvmclock2 append
v5:
- instead of introducing composit f-kvmclock property to maintain
legace behavior, set additional f-kvmclock2 in cpu_x86_parse_featurestr()
when kvmclock is parsed.
v4:
- major patch reordering, rebasing on current qom-cpu-next
- merged patches: "define static properties..." and "set [+-]feature..."
- merge in "make 'f-kvmclock' compatible..." to aviod behavior breakage
- use register name in feature macros, so that if we rename cpuid_* fields,
it wouldn't involve mass rename in features array.
- when converting feature names into property names, replace '_' with '-',
Requested-By: Don Slutz <Don@cloudswitch.com>,
mgs-id: <5085D4AA.1060208@CloudSwitch.Com>
v3:
- new static properties after rebase:
- add features "f-rdseed" & "f-adx"
- add features added by c8acc38
- add features f-kvm_steal_tm and f-kvmclock_stable
- ext4 features f-xstore, f-xstore-en, f-xcrypt, f-xcrypt-en,
f-ace2, f-ace2-en, f-phe, f-phe-en, f-pmm, f-pmm-en
- f-hypervisor set default to false as for the rest of features
- define helper FEAT for declaring CPUID feature properties to
make shorter lines (<80 characters)
v2:
- use X86CPU as a type to count of offset correctly, because env field
isn't starting at CPUstate beginning, but located after it.- Loading branch information
Igor Mammedov
committed
Oct 15, 2013
1 parent
6c91fce
commit dcd75a2
Showing
1 changed file
with
197 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters