Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .buildkite/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@
import subprocess
from pathlib import Path

# fmt: off
DEFAULT_INSTANCES = [
"c5n.metal", # Intel Skylake
"m5n.metal", # Intel Cascade Lake
"m6i.metal", # Intel Icelake
"m6a.metal", # AMD Milan
"m7a.metal-48xl", # AMD Genoa
"m6g.metal", # Graviton2
"m7g.metal", # Graviton3
"c5n.metal", # Intel Skylake
"m5n.metal", # Intel Cascade Lake
"m6i.metal", # Intel Icelake
"m7i.metal-24xl", # Intel Sapphire Rapids
"m7i.metal-48xl", # Intel Sapphire Rapids
"m6a.metal", # AMD Milan
"m7a.metal-48xl", # AMD Genoa
"m6g.metal", # Graviton2
"m7g.metal", # Graviton3
]
# fmt: on

DEFAULT_PLATFORMS = [
("al2", "linux_5.10"),
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/pipeline_cpu_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class BkStep(str, Enum):
"c5n.metal",
"m5n.metal",
"m6i.metal",
"m7i.metal-24xl",
"m7i.metal-48xl",
"m6a.metal",
"m7a.metal-48xl",
],
Expand Down Expand Up @@ -69,6 +71,8 @@ class BkStep(str, Enum):
"c5n.metal",
"m5n.metal",
"m6i.metal",
"m7i.metal-24xl",
"m7i.metal-48xl",
"m6a.metal",
],
},
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/pipeline_cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"c5n.metal",
"m5n.metal",
"m6i.metal",
"m7i.metal-24xl",
"m7i.metal-48xl",
"m6a.metal",
"m7a.metal-48xl",
]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ We test all combinations of:
| c5n.metal | al2 linux_5.10 | ubuntu 24.04 | linux_5.10 |
| m5n.metal | al2023 linux_6.1 | | linux_6.1 |
| m6i.metal | | | |
| m7i.metal-24xl | | | |
| m7i.metal-48xl | | | |
| m6a.metal | | | |
| m7a.metal-48xl | | | |
| m6g.metal | | | |
Expand Down
2 changes: 1 addition & 1 deletion src/vmm/src/cpu_config/aarch64/static_cpu_templates/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mod tests {

#[test]
fn verify_consistency_with_json_templates() {
let static_templates = [(v1n1::v1n1(), "v1n1.json")];
let static_templates = [(v1n1::v1n1(), "V1N1.json")];

for (hardcoded_template, filename) in static_templates {
let json_template = get_json_template(filename);
Expand Down
10 changes: 5 additions & 5 deletions src/vmm/src/cpu_config/x86_64/static_cpu_templates/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ mod tests {
#[test]
fn verify_consistency_with_json_templates() {
let static_templates = [
(c3::c3(), "c3.json"),
(t2::t2(), "t2.json"),
(t2s::t2s(), "t2s.json"),
(t2cl::t2cl(), "t2cl.json"),
(t2a::t2a(), "t2a.json"),
(c3::c3(), "C3.json"),
(t2::t2(), "T2.json"),
(t2s::t2s(), "T2S.json"),
(t2cl::t2cl(), "T2CL.json"),
(t2a::t2a(), "T2A.json"),
];

for (hardcoded_template, filename) in static_templates {
Expand Down
22 changes: 16 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from framework.properties import global_props
from framework.utils_cpu_templates import (
custom_cpu_templates_params,
get_cpu_template_name,
static_cpu_templates_params,
)
from host_tools.metrics import get_metrics_logger
Expand Down Expand Up @@ -236,6 +237,18 @@ def change_net_config_space_bin(test_fc_session_root_path):
yield change_net_config_space_bin


@pytest.fixture(scope="session")
def waitpkg_bin(test_fc_session_root_path):
"""Build a binary that attempts to use WAITPKG (UMONITOR / UMWAIT)"""
waitpkg_bin_path = os.path.join(test_fc_session_root_path, "waitpkg")
build_tools.gcc_compile(
"host_tools/waitpkg.c",
waitpkg_bin_path,
extra_flags="-mwaitpkg",
)
yield waitpkg_bin_path


@pytest.fixture
def bin_seccomp_paths():
"""Build jailers and jailed binaries to test seccomp.
Expand Down Expand Up @@ -361,12 +374,9 @@ def custom_cpu_template(request, record_property):
)
def cpu_template_any(request, record_property):
"""This fixture combines no template, static and custom CPU templates"""
cpu_template_name = request.param
if request.param is None:
cpu_template_name = "None"
elif "name" in request.param:
cpu_template_name = request.param["name"]
record_property("cpu_template", cpu_template_name)
record_property(
"cpu_template", get_cpu_template_name(request.param, with_type=True)
)
return request.param


Expand Down
102 changes: 102 additions & 0 deletions tests/data/custom_cpu_templates/SPR_TO_T2_5.10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"cpuid_modifiers": [
{
"leaf": "0x1",
"subleaf": "0x0",
"flags": 0,
"modifiers": [
{
"register": "eax",
"bitmap": "0bxxxx000000000011xx00011011110010"
},
{
"register": "ecx",
"bitmap": "0bxxxxxxxxxxxxx0xx00xx00x0000000xx"
},
{
"register": "edx",
"bitmap": "0b000x0xxxx00xx0xxxxx1xxxx1xxxxxxx"
}
]
},
{
"leaf": "0x7",
"subleaf": "0x0",
"flags": 1,
"modifiers": [
{
"register": "ebx",
"bitmap": "0b00000000000x000000x00x1xxxx0x0xx"
},
{
"register": "ecx",
"bitmap": "0bx0x00x00x0xxxxx0x0x00000x0x0000x"
},
{
"register": "edx",
"bitmap": "0bxxxxxx0000xxxxx0x0xxxxx0xxx000xx"
}
]
},
{
"leaf": "0x7",
"subleaf": "0x1",
"flags": 1,
"modifiers": [
{
"register": "eax",
"bitmap": "0bxxxxxxxxxxxxxxxxxxxxxxxxxx00xxxx"
}
]
},
{
"leaf": "0xd",
"subleaf": "0x0",
"flags": 1,
"modifiers": [
{
"register": "eax",
"bitmap": "0bxxxxxxxxxxxxx00xxxxxxx0x00000xxx"
}
]
},
{
"leaf": "0xd",
"subleaf": "0x1",
"flags": 1,
"modifiers": [
{
"register": "eax",
"bitmap": "0bxxxxxxxxxxxxxxxxxxxxxxxxxxx0000x"
}
]
},
{
"leaf": "0x80000001",
"subleaf": "0x0",
"flags": 0,
"modifiers": [
{
"register": "ecx",
"bitmap": "0bxx0xxxxxxxxxxxxxxxxxxxx0xxxxxxxx"
},
{
"register": "edx",
"bitmap": "0bxxxxx0xxxxxxxxxxxxxxxxxxxxxxxxxx"
}
]
},
{
"leaf": "0x80000008",
"subleaf": "0x0",
"flags": 0,
"modifiers": [
{
"register": "ebx",
"bitmap": "0bxxxxxxxxxxxxxxxxxxxxxx0xxxxxxxxx"
}
]
}
],
"msr_modifiers": []
}
Loading