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