You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.4 KiB

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