summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2015-03-31 11:08:12 +0200
committerLennart Poettering <lennart@poettering.net>2015-03-31 15:36:53 +0200
commitdb6a86897efb337100165c017da81cc70fac51e2 (patch)
tree578ac3df9c50e2626056f1b1ddc9a64a60f7a62b /src/shared
parentb8f1df82646d27452ba2ee9f843df42ee7a2c002 (diff)
ARM: detect-virt: detect Xen
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/virt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/virt.c b/src/shared/virt.c
index aa3501f429..712523210d 100644
--- a/src/shared/virt.c
+++ b/src/shared/virt.c
@@ -102,7 +102,7 @@ static int detect_vm_cpuid(const char **_id) {
}
static int detect_vm_devicetree(const char **_id) {
-#if defined(__powerpc__) || defined(__powerpc64__)
+#if defined(__arm__) || defined(__aarch64__) || defined(__powerpc__) || defined(__powerpc64__)
_cleanup_free_ char *hvtype = NULL;
int r;
@@ -111,6 +111,9 @@ static int detect_vm_devicetree(const char **_id) {
if (streq(hvtype, "linux,kvm")) {
*_id = "kvm";
return 1;
+ } else if (strstr(hvtype, "xen")) {
+ *_id = "xen";
+ return 1;
}
}
#endif