x86: provide enabled and disabled variation of the PCID test
Paolo Bonzini
maintainerPATCH 1/1 x86: provide enabled and disabled variation of the PCID test
The PCID test checks for exceptions when PCID=0 or INVPCID=0 in CPUID. Cover that by adding a separate testcase with different CPUID.
--- x86/unittests.cfg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
x86/unittests.cfg +6 -1
@@ -228,7 +228,12 @@ extra_params = --append "10000000 `date +%s`" [pcid] file = pcid.flat -extra_params = -cpu qemu64,+pcid +extra_params = -cpu qemu64,+pcid,+invpcid +arch = x86_64 + +[pcid-disabled] +file = pcid.flat +extra_params = -cpu qemu64,-pcid,-invpcid arch = x86_64 [rdpru]
Signature · 1 line
1.8.3.1
Quoted 15 lines · Paolo Bonzini
The PCID test checks for exceptions when PCID=0 or INVPCID=0 in CPUID. Cover that by adding a separate testcase with different CPUID.
Signed-off-by Paolo Bonzini <[email protected]>--- x86/unittests.cfg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)x86/unittests.cfg +0
-0@@ -228,7 +228,12 @@ extra_params = --append "10000000 `date +%s`"
x86/unittests.cfg extra_params = --append "10000000 `date +%s`" · line 237
Quoted 10 lines
x86/unittests.cfg +6
-1[pcid] file = pcid.flat -extra_params = -cpu qemu64,+pcid +extra_params = -cpu qemu64,+pcid,+invpcid +arch = x86_64 + +[pcid-disabled] +file = pcid.flat +extra_params = -cpu qemu64,-pcid,-invpcid arch = x86_64
Hrm, but "-cpu qemu64,-pcid,+invpcid" is arguably the more interesting test from a KVM perspective because of the logic in KVM to hide invpcid if pcid isn't supported.
And +pcid,-invpcid is also interesting.
Is there an easy-ish change that can be made to allow iterating over multiple CPU configurations for single test case?
Quoted 31 lines · Sean Christopherson
Quoted 15 lines · Paolo Bonzini
The PCID test checks for exceptions when PCID=0 or INVPCID=0 in CPUID. Cover that by adding a separate testcase with different CPUID.
Signed-off-by Paolo Bonzini <[email protected]>--- x86/unittests.cfg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)x86/unittests.cfg +0
-0@@ -228,7 +228,12 @@ extra_params = --append "10000000 `date +%s`"x86/unittests.cfg extra_params = --append "10000000 `date +%s`" · line 237
Quoted 10 lines
x86/unittests.cfg +6
-1[pcid] file = pcid.flat -extra_params = -cpu qemu64,+pcid +extra_params = -cpu qemu64,+pcid,+invpcid +arch = x86_64 + +[pcid-disabled] +file = pcid.flat +extra_params = -cpu qemu64,-pcid,-invpcid arch = x86_64Hrm, but "-cpu qemu64,-pcid,+invpcid" is arguably the more interesting test from a KVM perspective because of the logic in KVM to hide invpcid if pcid isn't supported.
Quoted 5 lines
And +pcid,-invpcid is also interesting.
Is there an easy-ish change that can be made to allow iterating over multiple CPU configurations for single test case?
Just a small change to Paolo's patch
[pcid]
file = pcid.flatextra_params = -cpu qemu64,+pcid,+invpcid
arch = x86_64
group = pcid
[pcid-disabled]
file = pcid.flatextra_params = -cpu qemu64,-pcid,-invpcid
arch = x86_64
group = pcid
[pcid-more-interesting]
file = pcid.flatextra_params = -cpu qemu64,-pcid,+invpcid
arch = x86_64
group = pcid
Then run the group with ./run_tests.sh -g pcid
Thanks,
drew
Quoted 52 lines · Andrew Jones
Quoted 31 lines · Sean Christopherson
Quoted 15 lines · Paolo Bonzini
The PCID test checks for exceptions when PCID=0 or INVPCID=0 in CPUID. Cover that by adding a separate testcase with different CPUID.
Signed-off-by Paolo Bonzini <[email protected]>--- x86/unittests.cfg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)x86/unittests.cfg +0
-0@@ -228,7 +228,12 @@ extra_params = --append "10000000 `date +%s`"x86/unittests.cfg extra_params = --append "10000000 `date +%s`" · line 237
Quoted 10 lines
x86/unittests.cfg +6
-1[pcid] file = pcid.flat -extra_params = -cpu qemu64,+pcid +extra_params = -cpu qemu64,+pcid,+invpcid +arch = x86_64 + +[pcid-disabled] +file = pcid.flat +extra_params = -cpu qemu64,-pcid,-invpcid arch = x86_64Hrm, but "-cpu qemu64,-pcid,+invpcid" is arguably the more interesting test from a KVM perspective because of the logic in KVM to hide invpcid if pcid isn't supported.
Quoted 5 lines
And +pcid,-invpcid is also interesting.
Is there an easy-ish change that can be made to allow iterating over multiple CPU configurations for single test case?
Just a small change to Paolo's patch
[pcid]
file = pcid.flatextra_params= -cpu qemu64,+pcid,+invpcid
arch =x86_64
group = pcid[pcid-disabled]
file = pcid.flatextra_params= -cpu qemu64,-pcid,-invpcid
arch =x86_64
group = pcid
Quoted 7 lines
[pcid-more-interesting]
file = pcid.flatextra_params= -cpu qemu64,-pcid,+invpcid
arch =x86_64
group = pcidThen run the group with ./run_tests.sh -g pcid
Ya, I was thinking more long term, e.g. syntax like:
[pcid]
file = pcid.flat
permute_features = pcid,invpcid
arch = x86_64
In general, I would love to have infrastructure to permute over *all* the interesting bits of KVM, e.g. module params and whatnot.