[systemd-devel] [PATCH v2 2/3] ARM: detect-virt: detect Xen

Andrew Jones drjones at redhat.com
Tue Mar 31 02:08:12 PDT 2015


---
 src/shared/virt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/shared/virt.c b/src/shared/virt.c
index aa3501f42916c..712523210d720 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
-- 
1.9.3



More information about the systemd-devel mailing list