Skip to content

Commit ee2cc49

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 <[email protected]>
1 parent fa1af46 commit ee2cc49

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
@@ -31,6 +31,7 @@ class CpuModel(str, Enum):
3131
INTEL_SKYLAKE = "INTEL_SKYLAKE"
3232
INTEL_CASCADELAKE = "INTEL_CASCADELAKE"
3333
INTEL_ICELAKE = "INTEL_ICELAKE"
34+
INTEL_SAPPHIRE_RAPIDS = "INTEL_SAPPHIRE_RAPIDS"
3435

3536

3637
CPU_DICT = {
@@ -39,6 +40,7 @@ class CpuModel(str, Enum):
3940
"Intel(R) Xeon(R) Platinum 8124M CPU": "INTEL_SKYLAKE",
4041
"Intel(R) Xeon(R) Platinum 8259CL CPU": "INTEL_CASCADELAKE",
4142
"Intel(R) Xeon(R) Platinum 8375C CPU": "INTEL_ICELAKE",
43+
"Intel(R) Xeon(R) Platinum 8488C": "INTEL_SAPPHIRE_RAPIDS",
4244
},
4345
CpuVendor.AMD: {"AMD EPYC 7R13": "AMD_MILAN", "AMD EPYC 9R14": "AMD_GENOA"},
4446
CpuVendor.ARM: {"0xd0c": "ARM_NEOVERSE_N1", "0xd40": "ARM_NEOVERSE_V1"},
@@ -78,6 +80,8 @@ def get_cpu_codename(default="Unknown"):
7880
result = re.match(r"^(.*) @.*$", cpu_model)
7981
if result:
8082
return CPU_DICT[CpuVendor.INTEL].get(result.group(1), default)
83+
else:
84+
return CPU_DICT[CpuVendor.INTEL].get(cpu_model, default)
8185
if vendor == CpuVendor.AMD:
8286
result = re.match(r"^(.*) [0-9]*-Core Processor$", cpu_model)
8387
if result:

0 commit comments

Comments
 (0)