valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone
1abbee
From a64e8d52d4058451e8b8d291db4cc276ee31d46d Mon Sep 17 00:00:00 2001
1abbee
From: Andrew Jones <drjones@redhat.com>
1abbee
Date: Mon, 9 Nov 2015 14:22:20 +0100
1abbee
Subject: [PATCH] arm/aarch64: detect-virt: check dmi
1abbee
1abbee
ARM/AArch64 guests now have SMBIOS tables populated (when boot
1abbee
with a late enough QEMU and a late enough AAVMF is used as the
1abbee
bootloader). Furthermore, when booting ARM/AArch64 guests with
1abbee
ACPI, the DT detection obviously no longer works, so we need
1abbee
dmi detection.
1abbee
1abbee
Cherry-picked from: 2ef8a4c4399dcb7b6fcaecd41f27377b584e9a4b
1abbee
Resolves: #1278165
1abbee
---
1abbee
 src/shared/virt.c | 5 ++---
1abbee
 1 file changed, 2 insertions(+), 3 deletions(-)
1abbee
1abbee
diff --git a/src/shared/virt.c b/src/shared/virt.c
Pablo Greco 48fc63
index 54c465520d..d3ce8dda7f 100644
1abbee
--- a/src/shared/virt.c
1abbee
+++ b/src/shared/virt.c
1abbee
@@ -29,7 +29,7 @@
1abbee
 
1abbee
 static int detect_vm_cpuid(const char **_id) {
1abbee
 
1abbee
-        /* Both CPUID and DMI are x86 specific interfaces... */
1abbee
+        /* CPUID is an x86 specific interface. */
1abbee
 #if defined(__i386__) || defined(__x86_64__)
1abbee
 
1abbee
         static const char cpuid_vendor_table[] =
1abbee
@@ -139,8 +139,7 @@ static int detect_vm_devicetree(const char **_id) {
1abbee
 
1abbee
 static int detect_vm_dmi(const char **_id) {
1abbee
 
1abbee
-        /* Both CPUID and DMI are x86 specific interfaces... */
1abbee
-#if defined(__i386__) || defined(__x86_64__)
1abbee
+#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
1abbee
 
1abbee
         static const char *const dmi_vendors[] = {
1abbee
                 "/sys/class/dmi/id/sys_vendor",