]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
virt: Actually use DMI detection on RISC-V as well
authorFabian Vogt <fvogt@suse.de>
Fri, 1 Aug 2025 08:59:09 +0000 (10:59 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 1 Aug 2025 11:04:22 +0000 (12:04 +0100)
When booting Linux with ACPI in QEMU, the device tree is not used and
the DT based detection will not work. DMI values are accurate though
and indicate QEMU.

While detect_vm_dmi_vendor() was enabled for RISC-V in a previous commit,
it missed detect_vm_dmi(), so it was never actually used. Fix that.

Signed-off-by: Fabian Vogt <fvogt@suse.de>
src/basic/virt.c

index 13917058d885a0176c403fe7e6c0678f8aff8e36..226d0b53f8df0c7911a67c56451fabd249ef109f 100644 (file)
@@ -254,7 +254,7 @@ static int detect_vm_smbios(void) {
 #endif /* defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__loongarch_lp64) */
 
 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(__riscv)
 
         int r;
         r = detect_vm_dmi_vendor();