Skip to content

Commit

Permalink
KVM: Add MWAIT/MONITOR test cases
Browse files Browse the repository at this point in the history
3 mwait test cases for TD
3 mwait test cases for Non-TD
Also add MWAIT/MONITOR in instruction-check

Signed-off-by: Xudong Hao <[email protected]>
  • Loading branch information
xhao22 committed Nov 12, 2024
1 parent 2187c57 commit ea4702b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BM/instruction-check/feature_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"cpuid": ['1', '0', '0', '0', 'c', '26'],
"platforms": {"SPR", "EMR", "GNR", "SRF", "CWF"}
},
"MONITOR": {
"cpuid": ['1', '0', '3', '0', 'c', '3'],
"platforms": {"SPR", "EMR", "GNR", "SRF", "CWF"}
},
"FSGSBASE": {
"cpuid": ['7', '0', '0', '0', 'b', '0'],
"platforms": {"SPR", "EMR", "GNR", "SRF", "CWF"}
Expand Down
8 changes: 8 additions & 0 deletions KVM/qemu/x86_cpu_flags.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@
- disable:
cpu_model_flags = ",-tsc-deadline"
no_flags = "tsc_deadline_timer"
- mwait:
flags = "monitor"
variants:
- enable:
cpu-pm = on
- disable:
cpu-pm = off
no_flags = "monitor"
variants:
- vm:
# Only No-TDVM supports soft reboot
Expand Down
3 changes: 3 additions & 0 deletions KVM/qemu/x86_cpuid.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
features = "VPCLMULQDQ"
- sha_ni:
features = "SHA_NI"
- mwait:
features = "MONITOR"
cpu-pm = on
variants:
- vm:
- tdvm:
Expand Down

0 comments on commit ea4702b

Please sign in to comment.