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