[PATCH 0/3] i386: Ensure feature names are always defined

Eduardo Habkost posted 3 patches 3 years, 2 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210201225404.3941395-1-ehabkost@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <richard.henderson@linaro.org>
target/i386/cpu.c | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
[PATCH 0/3] i386: Ensure feature names are always defined
Posted by Eduardo Habkost 3 years, 2 months ago
Forgetting to adding feature names to the feature array
seems to be a very common mistake.

Examples:

- Missing name for MSR_VMX_EPT_WB
  commit 0723cc8a5558 ("target/i386: add VMX features to named CPU models")
- Missing name for "ibrs" at
  https://lore.kernel.org/qemu-devel/0ad4017d-e755-94a3-859e-800661bcd2d1@amd.com

This series fixes the MSR_VMX_EPT_WB problem and adds a runtime
check that should detect similar mistakes even before CPU model
classes are registered.

Eduardo Habkost (3):
  i386: Add missing "vmx-ept-wb" feature name
  i386: Move asserts to separate x86_cpudef_validate() function
  i386: Sanity check CPU model feature sets

 target/i386/cpu.c | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

-- 
2.28.0