Package: libvirt Version: 10.10.0-4 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu plucky ubuntu-patch
Dear Maintainer, On riscv64 the libvirtd.service shows an error Host sysinfo extraction not supported on this platform: Function not implemented libvirtd.service: Deactivated successfully. This is due to a bug in src/util/virsysinfo.c where the wrong symbol is used to detect the RISC-V architecture. The bug makes virt-manager unusable on RISC-V. In Ubuntu, the attached patch was applied to achieve the following: * d/p/u/virsysinfo-fix-RISC-V-detection.patch: Fix compiler macro to correctly detect RISC-V. (LP: #2095488) Thanks for considering the patch. Best regards Heinrich -- System Information: Debian Release: trixie/sid APT prefers plucky APT policy: (500, 'plucky') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.11.0-9-generic (SMP w/32 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru libvirt-10.10.0/debian/patches/series libvirt-10.10.0/debian/patches/series --- libvirt-10.10.0/debian/patches/series 2025-01-07 20:32:53.000000000 +0100 +++ libvirt-10.10.0/debian/patches/series 2025-01-22 18:15:16.000000000 +0100 @@ -14,6 +14,7 @@ ubuntu/ovmf_paths.patch ubuntu/wait-for-qemu-kvm.patch ubuntu/swtpm-by-swtpm-user.patch +ubuntu/virsysinfo-fix-RISC-V-detection.patch # Ubuntu Apparmor Changes ubuntu-aa/0020-virt-aa-helper-ubuntu-storage-paths.patch diff -Nru libvirt-10.10.0/debian/patches/ubuntu/virsysinfo-fix-RISC-V-detection.patch libvirt-10.10.0/debian/patches/ubuntu/virsysinfo-fix-RISC-V-detection.patch --- libvirt-10.10.0/debian/patches/ubuntu/virsysinfo-fix-RISC-V-detection.patch 1970-01-01 01:00:00.000000000 +0100 +++ libvirt-10.10.0/debian/patches/ubuntu/virsysinfo-fix-RISC-V-detection.patch 2025-01-22 18:14:32.000000000 +0100 @@ -0,0 +1,30 @@ +From: Heinrich Schuchardt <heinrich.schucha...@canonical.com> +Date: Wed, 22 Jan 2025 12:12:30 +0100 +Subject: [PATCH 1/1] virsysinfo: fix RISC-V detection + +The correct compiler define to detect the RISC-V architecture is __riscv. + +Fixes: b902cfece0db ("virsysinfo: Try reading DMI table") +Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2095488 +Origin: https://lists.libvirt.org/archives/list/de...@lists.libvirt.org/thread/YJQSZWRNMQ5VQ5JXSSR4K2VNAKJUFEDP/ +--- + src/util/virsysinfo.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c +index d9b2b5e89e..b7413c3bf5 100644 +--- a/src/util/virsysinfo.c ++++ b/src/util/virsysinfo.c +@@ -1254,7 +1254,7 @@ virSysinfoRead(void) + (defined(__x86_64__) || \ + defined(__i386__) || \ + defined(__amd64__) || \ +- defined(__riscv__) || \ ++ defined(__riscv) || \ + defined(__mips__) || \ + defined(__loongarch__)) + return virSysinfoReadDMI(); +-- +2.47.1 +