git.annexia.org
/
virt-what.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ee7259
)
xen: More reliable differentiation of dom0 and domU.
author
Richard W.M. Jones
<rjones@redhat.com>
Mon, 18 Oct 2010 19:02:21 +0000
(20:02 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Mon, 18 Oct 2010 19:02:21 +0000
(20:02 +0100)
virt-what.in
patch
|
blob
|
history
diff --git
a/virt-what.in
b/virt-what.in
index
313cd06
..
375822e
100644
(file)
--- a/
virt-what.in
+++ b/
virt-what.in
@@
-121,11
+121,13
@@
fi
if [ "$cpuid" = "XenVMMXenVMM" ]; then
echo xen; echo xen-hvm
is_xen=1
-elif [ -f /proc/xen/privcmd ]; then
- echo xen; echo xen-dom0
- is_xen=1
elif [ -f /proc/xen/capabilities ]; then
- echo xen; echo xen-domU
+ echo xen
+ if grep -q "control_d" /proc/xen/capabilities; then
+ echo xen-dom0
+ else
+ echo xen-domU
+ fi
is_xen=1
elif [ -d /proc/xen ]; then
# This directory can be present when Xen paravirt drivers are