Re: [Qemu-devel] [PATCH 0/6] target-i386: Increase CPUID level/xlevel/xlevel2 automatically

2016-09-21 Thread Eduardo Habkost
On Wed, Sep 21, 2016 at 11:49:04AM -0700, 
no-re...@ec2-52-6-146-230.compute-1.amazonaws.com wrote:
> Hi,
> 
> Your series seems to have some coding style problems. See output below for
> more information:
> 
> Type: series
> Message-id: 1474482404-15678-1-git-send-email-ehabk...@redhat.com
> Subject: [Qemu-devel] [PATCH 0/6] target-i386: Increase CPUID 
> level/xlevel/xlevel2 automatically

Oops! I have fixed the problems below in my local branch. The only remaining
warnings are:

/tmp/tmp.JqvmKcw0pK/0004-tests-Test-CPUID-level-handling-for-old-machines.patch 
has no obvious style problems and is ready for submission.
WARNING: line over 80 characters
#188: FILE: target-i386/cpu.c:3479:
+DEFINE_PROP_UINT32("max-xlevel2", X86CPU, env.cpuid_max_xlevel2, 
UINT32_MAX),

WARNING: line over 80 characters
#189: FILE: target-i386/cpu.c:3480:
+DEFINE_PROP_BOOL("cpuid-auto-level-7-0-ecx", X86CPU, 
cpuid_auto_level_7_0_ecx, true),

total: 0 errors, 2 warnings, 238 lines checked


> 
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
> 
> BASE=base
> n=1
> total=$(git log --oneline $BASE.. | wc -l)
> failed=0
> 
> # Useful git options
> git config --local diff.renamelimit 0
> git config --local diff.renames True
> 
> commits="$(git log --format=%H --reverse $BASE..)"
> for c in $commits; do
> echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
> if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; 
> then
> failed=1
> echo
> fi
> n=$((n+1))
> done
> 
> exit $failed
> === TEST SCRIPT END ===
> 
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> From https://github.com/patchew-project/qemu
>  - [tag update]  
> patchew/1470993574-11906-1-git-send-email-f...@redhat.com -> 
> patchew/1470993574-11906-1-git-send-email-f...@redhat.com
>  * [new tag] 
> patchew/1474482404-15678-1-git-send-email-ehabk...@redhat.com -> 
> patchew/1474482404-15678-1-git-send-email-ehabk...@redhat.com
> Switched to a new branch 'test'
> cce6853 target-i386: Enable CPUID[0x800A] if SVM is enabled
> b0097d2 target-i386: Automatically set level/xlevel/xlevel2 when needed
> 8b47896 tests: Test CPUID level handling for old machines
> 5fcfd1b tests: Add test code for CPUID level/xlevel handling
> 32d3954 target-i386: Add a marker to end of the region zeroed on reset
> de76d02 target-i386: Remove unused X86CPUDefinition::xlevel2 field
> 
> === OUTPUT BEGIN ===
> Checking PATCH 1/6: target-i386: Remove unused X86CPUDefinition::xlevel2 
> field...
> Checking PATCH 2/6: target-i386: Add a marker to end of the region zeroed on 
> reset...
> Checking PATCH 3/6: tests: Add test code for CPUID level/xlevel handling...
> WARNING: line over 80 characters
> #113: FILE: tests/test-x86-cpuid-compat.c:76:
> +add_cpuid_test("x86/cpuid/SandyBridge/level", "-cpu SandyBridge", 
> "level", 0xd);
> 
> WARNING: line over 80 characters
> #115: FILE: tests/test-x86-cpuid-compat.c:78:
> +add_cpuid_test("x86/cpuid/core2duo/xlevel", "-cpu core2duo", "xlevel", 
> 0x8008);
> 
> WARNING: line over 80 characters
> #116: FILE: tests/test-x86-cpuid-compat.c:79:
> +add_cpuid_test("x86/cpuid/phenom/xlevel", "-cpu phenom", "xlevel", 
> 0x801A);
> 
> ERROR: line over 90 characters
> #120: FILE: tests/test-x86-cpuid-compat.c:83:
> +add_cpuid_test("x86/cpuid/auto-level/phenom/fsgsbase", "-cpu 
> phenom,+fsgsbase", "level", 7);
> 
> ERROR: line over 90 characters
> #123: FILE: tests/test-x86-cpuid-compat.c:86:
> +add_cpuid_test("x86/cpuid/auto-level/SandyBridge/multiple", "-cpu 
> SandyBridge,+arat,+fsgsbase,+avx512vbmi", "level", 0xd);
> 
> ERROR: line over 90 characters
> #126: FILE: tests/test-x86-cpuid-compat.c:89:
> +add_cpuid_test("x86/cpuid/auto-xlevel/phenom/3dnow", "-cpu 
> phenom,+3dnow,+sse4a,+invtsc,+npt", "xlevel", 0x801A);
> 
> ERROR: line over 90 characters
> #129: FILE: tests/test-x86-cpuid-compat.c:92:
> +add_cpuid_test("x86/cpuid/auto-xlevel2/486/fixed", "-cpu 
> 486,xlevel2=0xC002,+xstore", "xlevel2", 0xC002);
> 
> total: 4 errors, 3 warnings, 109 lines checked
> 
> Your patch has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
> 
> Checking PATCH 4/6: tests: Test CPUID level handling for old machines...
> ERROR: line over 90 characters
> #21: FILE: tests/test-x86-cpuid-compat.c:94:

Re: [Qemu-devel] [PATCH 0/6] target-i386: Increase CPUID level/xlevel/xlevel2 automatically

2016-09-21 Thread no-reply
Hi,

Your series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 1474482404-15678-1-git-send-email-ehabk...@redhat.com
Subject: [Qemu-devel] [PATCH 0/6] target-i386: Increase CPUID 
level/xlevel/xlevel2 automatically

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
failed=1
echo
fi
n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]  patchew/1470993574-11906-1-git-send-email-f...@redhat.com 
-> patchew/1470993574-11906-1-git-send-email-f...@redhat.com
 * [new tag] 
patchew/1474482404-15678-1-git-send-email-ehabk...@redhat.com -> 
patchew/1474482404-15678-1-git-send-email-ehabk...@redhat.com
Switched to a new branch 'test'
cce6853 target-i386: Enable CPUID[0x800A] if SVM is enabled
b0097d2 target-i386: Automatically set level/xlevel/xlevel2 when needed
8b47896 tests: Test CPUID level handling for old machines
5fcfd1b tests: Add test code for CPUID level/xlevel handling
32d3954 target-i386: Add a marker to end of the region zeroed on reset
de76d02 target-i386: Remove unused X86CPUDefinition::xlevel2 field

=== OUTPUT BEGIN ===
Checking PATCH 1/6: target-i386: Remove unused X86CPUDefinition::xlevel2 
field...
Checking PATCH 2/6: target-i386: Add a marker to end of the region zeroed on 
reset...
Checking PATCH 3/6: tests: Add test code for CPUID level/xlevel handling...
WARNING: line over 80 characters
#113: FILE: tests/test-x86-cpuid-compat.c:76:
+add_cpuid_test("x86/cpuid/SandyBridge/level", "-cpu SandyBridge", "level", 
0xd);

WARNING: line over 80 characters
#115: FILE: tests/test-x86-cpuid-compat.c:78:
+add_cpuid_test("x86/cpuid/core2duo/xlevel", "-cpu core2duo", "xlevel", 
0x8008);

WARNING: line over 80 characters
#116: FILE: tests/test-x86-cpuid-compat.c:79:
+add_cpuid_test("x86/cpuid/phenom/xlevel", "-cpu phenom", "xlevel", 
0x801A);

ERROR: line over 90 characters
#120: FILE: tests/test-x86-cpuid-compat.c:83:
+add_cpuid_test("x86/cpuid/auto-level/phenom/fsgsbase", "-cpu 
phenom,+fsgsbase", "level", 7);

ERROR: line over 90 characters
#123: FILE: tests/test-x86-cpuid-compat.c:86:
+add_cpuid_test("x86/cpuid/auto-level/SandyBridge/multiple", "-cpu 
SandyBridge,+arat,+fsgsbase,+avx512vbmi", "level", 0xd);

ERROR: line over 90 characters
#126: FILE: tests/test-x86-cpuid-compat.c:89:
+add_cpuid_test("x86/cpuid/auto-xlevel/phenom/3dnow", "-cpu 
phenom,+3dnow,+sse4a,+invtsc,+npt", "xlevel", 0x801A);

ERROR: line over 90 characters
#129: FILE: tests/test-x86-cpuid-compat.c:92:
+add_cpuid_test("x86/cpuid/auto-xlevel2/486/fixed", "-cpu 
486,xlevel2=0xC002,+xstore", "xlevel2", 0xC002);

total: 4 errors, 3 warnings, 109 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 4/6: tests: Test CPUID level handling for old machines...
ERROR: line over 90 characters
#21: FILE: tests/test-x86-cpuid-compat.c:94:
+/* Compatibility test for older machine-types that don't auto-increase 
level/xlevel/xlevel2: */

ERROR: line over 90 characters
#23: FILE: tests/test-x86-cpuid-compat.c:96:
+add_cpuid_test("x86/cpuid/auto-level/pc-2.7", "-machine pc-i440fx-2.7 -cpu 
486,+arat,+avx512vbmi,+xsaveopt", "level", 1);

ERROR: line over 90 characters
#24: FILE: tests/test-x86-cpuid-compat.c:97:
+add_cpuid_test("x86/cpuid/auto-xlevel/pc-2.7", "-machine pc-i440fx-2.7 
-cpu 486,+3dnow,+sse4a,+invtsc,+npt", "xlevel", 0);

ERROR: line over 90 characters
#25: FILE: tests/test-x86-cpuid-compat.c:98:
+add_cpuid_test("x86/cpuid/auto-xlevel2/pc-2.7", "-machine pc-i440fx-2.7 
-cpu 486,+xstore", "xlevel2", 0);

total: 4 errors, 0 warnings, 11 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 5/6: target-i386: Automatically set level/xlevel/xlevel2 when 
needed...
WARNING: line over 80 characters
#69: FILE: target-i386/cpu.c:1647:
+env->cpuid_min_xlevel = kvm_arch_get_supported_cpuid(s, 0x8000,

[Qemu-devel] [PATCH 0/6] target-i386: Increase CPUID level/xlevel/xlevel2 automatically

2016-09-21 Thread Eduardo Habkost
This series fixes the inconsistency between CPUID[7].EBX features
and all the rest of the configurable CPU features. This ensures
that level/xlevel/xlevel2 will be set to appropriate values
depending on the set of features enabled in a CPU model or in the
command-line.

Eduardo Habkost (6):
  target-i386: Remove unused X86CPUDefinition::xlevel2 field
  target-i386: Add a marker to end of the region zeroed on reset
  tests: Add test code for CPUID level/xlevel handling
  tests: Test CPUID level handling for old machines
  target-i386: Automatically set level/xlevel/xlevel2 when needed
  target-i386: Enable CPUID[0x800A] if SVM is enabled

 include/hw/i386/pc.h  |  27 -
 target-i386/cpu.c |  94 +++
 target-i386/cpu.h |  16 +-
 tests/Makefile.include|   2 +
 tests/test-x86-cpuid-compat.c | 127 ++
 5 files changed, 252 insertions(+), 14 deletions(-)
 create mode 100644 tests/test-x86-cpuid-compat.c

-- 
2.7.4