Blame SOURCES/0142-ARM-detect-virt-detect-Xen.patch
|
|
17b0f1 |
From 6378069c62b2e5b1005df6bd243709181c178d1c Mon Sep 17 00:00:00 2001
|
|
|
17b0f1 |
From: Andrew Jones <drjones@redhat.com>
|
|
|
17b0f1 |
Date: Tue, 31 Mar 2015 11:08:12 +0200
|
|
|
17b0f1 |
Subject: [PATCH] ARM: detect-virt: detect Xen
|
|
|
17b0f1 |
|
|
|
17b0f1 |
Cherry-picked from: db6a86897efb3
|
|
|
17b0f1 |
Resolves: #1207773
|
|
|
17b0f1 |
---
|
|
|
17b0f1 |
src/shared/virt.c | 5 ++++-
|
|
|
17b0f1 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
17b0f1 |
|
|
|
17b0f1 |
diff --git a/src/shared/virt.c b/src/shared/virt.c
|
|
|
17b0f1 |
index aa3501f429..712523210d 100644
|
|
|
17b0f1 |
--- a/src/shared/virt.c
|
|
|
17b0f1 |
+++ b/src/shared/virt.c
|
|
|
17b0f1 |
@@ -102,7 +102,7 @@ static int detect_vm_cpuid(const char **_id) {
|
|
|
17b0f1 |
}
|
|
|
17b0f1 |
|
|
|
17b0f1 |
static int detect_vm_devicetree(const char **_id) {
|
|
|
17b0f1 |
-#if defined(__powerpc__) || defined(__powerpc64__)
|
|
|
17b0f1 |
+#if defined(__arm__) || defined(__aarch64__) || defined(__powerpc__) || defined(__powerpc64__)
|
|
|
17b0f1 |
_cleanup_free_ char *hvtype = NULL;
|
|
|
17b0f1 |
int r;
|
|
|
17b0f1 |
|
|
|
17b0f1 |
@@ -111,6 +111,9 @@ static int detect_vm_devicetree(const char **_id) {
|
|
|
17b0f1 |
if (streq(hvtype, "linux,kvm")) {
|
|
|
17b0f1 |
*_id = "kvm";
|
|
|
17b0f1 |
return 1;
|
|
|
17b0f1 |
+ } else if (strstr(hvtype, "xen")) {
|
|
|
17b0f1 |
+ *_id = "xen";
|
|
|
17b0f1 |
+ return 1;
|
|
|
17b0f1 |
}
|
|
|
17b0f1 |
}
|
|
|
17b0f1 |
#endif
|