diff --git a/3000-lscpu-add-alibaba-hyperv-vendor.patch b/3000-lscpu-add-alibaba-hyperv-vendor.patch new file mode 100644 index 0000000000000000000000000000000000000000..0f18f5ac4f246d686018ec81f112f85c41e1cae8 --- /dev/null +++ b/3000-lscpu-add-alibaba-hyperv-vendor.patch @@ -0,0 +1,56 @@ +From f98e6914b05b18b658f1a9544dc4879671a86a9f Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Fri, 23 Aug 2024 16:03:10 +0800 +Subject: [PATCH] lscpu: add alibaba hyperv vendor + +Add alibaba hyperv vendor. + +Signed-off-by: Guixin Liu +--- + sys-utils/lscpu-dmi.c | 2 ++ + sys-utils/lscpu.c | 3 ++- + sys-utils/lscpu.h | 1 + + 3 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c +index 3bdd7dc..157efa3 100644 +--- a/sys-utils/lscpu-dmi.c ++++ b/sys-utils/lscpu-dmi.c +@@ -187,6 +187,8 @@ static int hypervisor_from_dmi_table(uint32_t base, uint16_t len, + rc = HYPER_HITACHI; + else if (di.vendor && !strcmp(di.vendor, "Parallels")) + rc = HYPER_PARALLELS; ++ else if (di.vendor && !strcmp(di.vendor, "Alibaba")) ++ rc = HYPER_ALIBABA; + done: + free(data); + return rc; +diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c +index 71ac165..7f02267 100644 +--- a/sys-utils/lscpu.c ++++ b/sys-utils/lscpu.c +@@ -115,7 +115,8 @@ static const char *hv_vendors[] = { + [HYPER_OS400] = "OS/400", + [HYPER_PHYP] = "pHyp", + [HYPER_SPAR] = "Unisys s-Par", +- [HYPER_WSL] = "Windows Subsystem for Linux" ++ [HYPER_WSL] = "Windows Subsystem for Linux", ++ [HYPER_ALIBABA] = "Alibaba" + }; + + static const int hv_vendor_pci[] = { +diff --git a/sys-utils/lscpu.h b/sys-utils/lscpu.h +index 802719e..ed5e7ea 100644 +--- a/sys-utils/lscpu.h ++++ b/sys-utils/lscpu.h +@@ -37,6 +37,7 @@ enum { + HYPER_PHYP, + HYPER_SPAR, + HYPER_WSL, ++ HYPER_ALIBABA, + }; + + /* CPU modes */ +-- +2.43.5 + diff --git a/util-linux.spec b/util-linux.spec index 593456705dab067bf27cdbfbf8283db544fa1276..eee9819045b75026b367f292cf8c860e22f14e25 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 ### Header Summary: A collection of basic system utilities Name: util-linux @@ -318,6 +318,8 @@ Patch1004: 1004-util-linux-add-sw.patch Patch2001: 0001-prlimit-fix-optional-arguments-parsing.patch +Patch3000: 3000-lscpu-add-alibaba-hyperv-vendor.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -1164,6 +1166,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Aug 23 2024 Guixin Liu 2.23.1-46.0.2 +- [Patch] lscpu: add alibaba hyperv vendor (kanie@linux.alibaba.com) + * Thu Jul 18 2024 Weitao Zhou 2.32.1-46.0.1 - [Patch] hwclock: better compatibility for both glibc2.28 and glibc2.31 - [Patch] lscpu: add Neoverse-N2 to ARM identifiers tables (flin@linux.alibaba.com)