Skip to content

Commit d901ba5

Browse files
committed
test: Detect Intel Sapphire Rapids as CPU model
We have to skip the snapshot restore performance test on Intel Sapphire Rappids for now, since a new KVM API (KVM_GET_XSAVE2) that has not been supported yet in rust-vmm kvm-ioctls, although it will be supported soon. To skip on Intel Sapphire Rapids, the python testing framework has to be able to detect Intel Sapphire Rapids. Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
1 parent f45fa0b commit d901ba5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/framework/utils_cpuid.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class CpuModel(str, Enum):
3232
INTEL_SKYLAKE = "INTEL_SKYLAKE"
3333
INTEL_CASCADELAKE = "INTEL_CASCADELAKE"
3434
INTEL_ICELAKE = "INTEL_ICELAKE"
35+
INTEL_SAPPHIRE_RAPIDS = "INTEL_SAPPHIRE_RAPIDS"
3536

3637

3738
CPU_DICT = {
@@ -40,6 +41,7 @@ class CpuModel(str, Enum):
4041
"Intel(R) Xeon(R) Platinum 8124M CPU": "INTEL_SKYLAKE",
4142
"Intel(R) Xeon(R) Platinum 8259CL CPU": "INTEL_CASCADELAKE",
4243
"Intel(R) Xeon(R) Platinum 8375C CPU": "INTEL_ICELAKE",
44+
"Intel(R) Xeon(R) Platinum 8488C": "INTEL_SAPPHIRE_RAPIDS",
4345
},
4446
CpuVendor.AMD: {"AMD EPYC 7R13": "AMD_MILAN", "AMD EPYC 9R14": "AMD_GENOA"},
4547
CpuVendor.ARM: {
@@ -83,6 +85,8 @@ def get_cpu_codename(default="Unknown"):
8385
result = re.match(r"^(.*) @.*$", cpu_model)
8486
if result:
8587
return CPU_DICT[CpuVendor.INTEL].get(result.group(1), default)
88+
# Some Intel CPUs (e.g. Intel Sapphire Rapids) don't include "@ <frequency>".
89+
return CPU_DICT[CpuVendor.INTEL].get(cpu_model, default)
8690
if vendor == CpuVendor.AMD:
8791
result = re.match(r"^(.*) [0-9]*-Core Processor$", cpu_model)
8892
if result:

0 commit comments

Comments
 (0)