Add support for Linux kernels with pv_ops running on Xen.
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 20 Jan 2011 15:38:30 +0000 (15:38 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 20 Jan 2011 15:39:46 +0000 (15:39 +0000)
These would be found for example on Amazon EC2 or Citrix Xen.

This also adds all the extra files found under /sys/hypervisor
on this platform.

15 files changed:
tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compile_date [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compiled_by [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compiler [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/properties/capabilities [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/properties/changeset [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/properties/pagesize [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/properties/virtual_start [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/properties/writable_pt [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/type [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/uuid [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/version/extra [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/version/major [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/version/minor [new file with mode: 0644]
tests/rhel5-xen-domU-pv/sys/hypervisor/vmcoreinfo [new file with mode: 0644]
virt-what.in

diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compile_date b/tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compile_date
new file mode 100644 (file)
index 0000000..054026b
--- /dev/null
@@ -0,0 +1 @@
+Sun Dec 19 14:18:54 EST 2010
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compiled_by b/tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compiled_by
new file mode 100644 (file)
index 0000000..5cbca69
--- /dev/null
@@ -0,0 +1 @@
+mockbuild
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compiler b/tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compiler
new file mode 100644 (file)
index 0000000..7c48582
--- /dev/null
@@ -0,0 +1 @@
+gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/properties/capabilities b/tests/rhel5-xen-domU-pv/sys/hypervisor/properties/capabilities
new file mode 100644 (file)
index 0000000..bc232bb
--- /dev/null
@@ -0,0 +1 @@
+xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/properties/changeset b/tests/rhel5-xen-domU-pv/sys/hypervisor/properties/changeset
new file mode 100644 (file)
index 0000000..a9489ec
--- /dev/null
@@ -0,0 +1 @@
+unavailable
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/properties/pagesize b/tests/rhel5-xen-domU-pv/sys/hypervisor/properties/pagesize
new file mode 100644 (file)
index 0000000..83b33d2
--- /dev/null
@@ -0,0 +1 @@
+1000
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/properties/virtual_start b/tests/rhel5-xen-domU-pv/sys/hypervisor/properties/virtual_start
new file mode 100644 (file)
index 0000000..aeac42b
--- /dev/null
@@ -0,0 +1 @@
+ffff800000000000
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/properties/writable_pt b/tests/rhel5-xen-domU-pv/sys/hypervisor/properties/writable_pt
new file mode 100644 (file)
index 0000000..f5c8955
--- /dev/null
@@ -0,0 +1 @@
+32
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/type b/tests/rhel5-xen-domU-pv/sys/hypervisor/type
new file mode 100644 (file)
index 0000000..1be72f4
--- /dev/null
@@ -0,0 +1 @@
+xen
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/uuid b/tests/rhel5-xen-domU-pv/sys/hypervisor/uuid
new file mode 100644 (file)
index 0000000..beaef4c
--- /dev/null
@@ -0,0 +1 @@
+e7a4b45e-2172-c900-4ba4-dd8796ce14cb
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/version/extra b/tests/rhel5-xen-domU-pv/sys/hypervisor/version/extra
new file mode 100644 (file)
index 0000000..5020d8e
--- /dev/null
@@ -0,0 +1 @@
+.2-238.el5
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/version/major b/tests/rhel5-xen-domU-pv/sys/hypervisor/version/major
new file mode 100644 (file)
index 0000000..00750ed
--- /dev/null
@@ -0,0 +1 @@
+3
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/version/minor b/tests/rhel5-xen-domU-pv/sys/hypervisor/version/minor
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/rhel5-xen-domU-pv/sys/hypervisor/vmcoreinfo b/tests/rhel5-xen-domU-pv/sys/hypervisor/vmcoreinfo
new file mode 100644 (file)
index 0000000..b748e2d
--- /dev/null
@@ -0,0 +1 @@
+0 0
index 9c2115a..627f961 100644 (file)
@@ -171,11 +171,12 @@ elif [ -f $root/proc/xen/capabilities ]; then
         echo xen-domU
     fi
     is_xen=1
-elif [ -d $root/proc/xen ]; then
-    # This directory can be present when Xen paravirt drivers are
-    # installed, even on baremetal.  Don't confuse people by
-    # printing anything.
-    :
+elif [ -f $root/sys/hypervisor/type ] &&
+    grep -q "xen" $root/sys/hypervisor/type; then
+    # Ordinary kernel with pv_ops.  There does not seem to be
+    # enough information at present to tell whether this is dom0
+    # or domU.  XXX
+    echo xen
 fi
 
 # Check for QEMU/KVM.