From f305c8f4a7d65b758b3392798495a712f6b2c0e3 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Fri, 1 Aug 2025 10:59:09 +0200 Subject: [PATCH] virt: Actually use DMI detection on RISC-V as well 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 --- src/basic/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/virt.c b/src/basic/virt.c index 13917058d8..226d0b53f8 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -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();