From 444772c3b8367ad789b912894f3e3afd7bacca58 Mon Sep 17 00:00:00 2001 From: Hailiang Date: Mon, 4 Aug 2025 17:43:50 +0800 Subject: [PATCH] add sw_64 support for virt (cherry picked from commit ac10eed3e917dd974c87e4c07a6b80facb0ae0c8) --- add-sw_64-support-for-virt.patch | 38 ++++++++++++++++++++++++++++++++ systemd.spec | 6 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 add-sw_64-support-for-virt.patch diff --git a/add-sw_64-support-for-virt.patch b/add-sw_64-support-for-virt.patch new file mode 100644 index 0000000..08f904d --- /dev/null +++ b/add-sw_64-support-for-virt.patch @@ -0,0 +1,38 @@ +From 95dedd5d0b1d1ddc00b707e3dde2c5878e09c8d2 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 4 Aug 2025 17:29:28 +0800 +Subject: [PATCH] add sw_64 support for virt + +--- + src/basic/virt.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/basic/virt.c b/src/basic/virt.c +index a0b6fbc..c0be890 100644 +--- a/src/basic/virt.c ++++ b/src/basic/virt.c +@@ -153,7 +153,7 @@ static Virtualization detect_vm_device_tree(void) { + #endif + } + +-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__loongarch_lp64) ++#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__loongarch_lp64) || defined(__sw_64__) + static Virtualization detect_vm_dmi_vendor(void) { + static const char* const dmi_vendors[] = { + "/sys/class/dmi/id/product_name", /* Test this before sys_vendor to detect KVM over QEMU */ +@@ -243,10 +243,10 @@ static int detect_vm_smbios(void) { + log_debug("DMI BIOS Extension table does not indicate virtualization."); + return SMBIOS_VM_BIT_UNSET; + } +-#endif /* defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__loongarch_lp64) */ ++#endif /* defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__loongarch_lp64) || defined(__sw_64__) */ + + static Virtualization detect_vm_dmi(void) { +-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__loongarch_lp64) ++#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__loongarch_lp64) || defined(__sw_64__) + + int r; + r = detect_vm_dmi_vendor(); +-- +2.20.1 + diff --git a/systemd.spec b/systemd.spec index b02dea5..dd1c352 100644 --- a/systemd.spec +++ b/systemd.spec @@ -25,7 +25,7 @@ Name: systemd Url: https://systemd.io/ Version: 255 -Release: 44 +Release: 45 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -168,6 +168,7 @@ Patch9060: systemd-logind-add-log-to-display-devices.patch Patch9061: delete-Assertion-o-object.type-OBJECT_ENTRY_ARRAY.patch Patch9801: Systemd-Add-sw64-architecture.patch +Patch9802: add-sw_64-support-for-virt.patch BuildRequires: gcc, gcc-c++ BuildRequires: libcap-devel, libmount-devel, pam-devel, libselinux-devel @@ -1700,6 +1701,9 @@ fi %{_unitdir}/veritysetup.target %changelog +* Mon Aug 04 2025 mahailiang - 255-45 +- add sw_64 support for virt + * Sun Jun 8 2025 Han Jinpeng - 255-44 - Fix CVE-2025-4598 -- Gitee