From 6be271f82922ad1136e6368f37c3398f59e5b1f9 Mon Sep 17 00:00:00 2001 From: shaojiansong Date: Wed, 23 Jul 2025 13:51:20 +0800 Subject: [PATCH] add zhaoxin cpu support --- 0007-add-zhaoxin-support.patch | 13 +++++++++++++ criu.spec | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 0007-add-zhaoxin-support.patch diff --git a/0007-add-zhaoxin-support.patch b/0007-add-zhaoxin-support.patch new file mode 100644 index 0000000..450a051 --- /dev/null +++ b/0007-add-zhaoxin-support.patch @@ -0,0 +1,13 @@ +diff --git a/compel/arch/x86/src/lib/cpu.c b/compel/arch/x86/src/lib/cpu.c +index f57fb31..cdaa080 100644 +--- a/compel/arch/x86/src/lib/cpu.c ++++ b/compel/arch/x86/src/lib/cpu.c +@@ -249,7 +249,7 @@ int compel_cpuid(compel_cpuinfo_t *c) + cpuid(0x00000000, (unsigned int *)&c->cpuid_level, (unsigned int *)&c->x86_vendor_id[0], + (unsigned int *)&c->x86_vendor_id[8], (unsigned int *)&c->x86_vendor_id[4]); + +- if (!strcmp(c->x86_vendor_id, "GenuineIntel")) { ++ if (!strcmp(c->x86_vendor_id, "GenuineIntel") || !strcmp(c->x86_vendor_id, "CentaurHauls")) { + c->x86_vendor = X86_VENDOR_INTEL; + } else if (!strcmp(c->x86_vendor_id, "AuthenticAMD") || !strcmp(c->x86_vendor_id, "HygonGenuine")) { + c->x86_vendor = X86_VENDOR_AMD; diff --git a/criu.spec b/criu.spec index e501ec6..c19f43a 100644 --- a/criu.spec +++ b/criu.spec @@ -1,6 +1,6 @@ Name: criu Version: 3.19 -Release: 7 +Release: 8 Provides: crtools = %{version}-%{release} Obsoletes: crtools <= 1.0-2 Summary: A tool of Checkpoint/Restore in User-space @@ -22,6 +22,7 @@ Patch3: 0003-chore-support-building-without-network.patch Patch4: 0004-criu-fix-log_keep_err-signal-deadlock.patch Patch5: 0005-lsm-use-the-user-provided-lsm-label.patch Patch6: 0006-test-others-rpc-do-not-use-nftables-locking-backend.patch +Patch7: 0007-add-zhaoxin-support.patch %description Checkpoint/Restore in Userspace(CRIU),is a software tool for the linux operating system. @@ -107,6 +108,9 @@ chmod 0755 %{buildroot}/run/%{name}/ %doc %{_mandir}/man1/{compel.1*,crit.1*,criu-ns.1*,criu-amdgpu-plugin.1*} %changelog +* Wed Jul 23 2025 shaojiansong - 3.19-8 +- add zhaoxin cpu support + * Mon Apr 21 2025 maxin - 3.19-7 - test: others/rpc do not use nftables locking backend -- Gitee