From: Jiri Denemark Date: Tue, 26 Mar 2019 20:20:38 +0000 (+0100) Subject: cputest: Add support for MSR features to cpu-parse.sh X-Git-Tag: v5.3.0-rc1~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8904492e21537f3b820e577964e67ad670fa640b;p=thirdparty%2Flibvirt.git cputest: Add support for MSR features to cpu-parse.sh The script just parses whatever cpu-gather.sh printed out. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- diff --git a/tests/cputestdata/cpu-parse.sh b/tests/cputestdata/cpu-parse.sh index a001647549..7501c57cba 100755 --- a/tests/cputestdata/cpu-parse.sh +++ b/tests/cputestdata/cpu-parse.sh @@ -23,12 +23,15 @@ fname="x86_64-cpuid-$fname" xml() { hex='\(0x[0-9a-f]\+\)' - match="$hex $hex: eax=$hex ebx=$hex ecx=$hex edx=$hex" - subst="" + matchCPUID="$hex $hex: eax=$hex ebx=$hex ecx=$hex edx=$hex" + substCPUID="" + + matchMSR="$hex: $hex\(.......[0-9a-f]\)" + substMSR="" echo "" echo "" - sed -ne "s/^ *$match$/ $subst/p" + sed -ne "s/^ *$matchCPUID$/ $substCPUID/p; s/^ *$matchMSR$/ $substMSR/p" echo "" } diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268.xml b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268.xml index 75472d44fe..f1261da891 100644 --- a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268.xml +++ b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268.xml @@ -51,4 +51,5 @@ +