Re: virt-what patch to support Logical Domains (LDoms) on Linux SPARC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Following up on this patch, attached is a modified version of this
patch, to use ${root} as appropriate.

I added this because running the tests on a SPARC machine with LDoms
caused other tests to fail.

I've not added any tests for LDoms itself since I didn't think it good to
add a character device to be added to the git repo.

Thanks,

Darren.
From e96f9328cf8ecf93a25c9a457d609009eaf66241 Mon Sep 17 00:00:00 2001
From: Darren Kenny <Darren.Kenny@xxxxxxxxxx>
Date: Tue, 4 Jul 2017 08:26:01 +0100
Subject: [PATCH] Add LDoms Support.

The current version of virt-what does not support discovery of any
Logical Domains (LDoms) variants. This patch adds that support.

Orabug: 26106813

Signed-off-by: Darren Kenny <darren.kenny@xxxxxxxxxx>
Reviewed-By: Liam Merwick <liam.merwick@xxxxxxxxxx>
Reviewed-By: Rashmi Narasimhan <rashmi.narasimhan@xxxxxxxxxx>
---
 virt-what.in  | 20 ++++++++++++++++++++
 virt-what.pod | 31 +++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/virt-what.in b/virt-what.in
index 39afedb..5ff9bb4 100644
--- a/virt-what.in
+++ b/virt-what.in
@@ -343,3 +343,23 @@ if [ "$arch" = "ppc64" ]; then
         fi
     fi
 fi
+
+#Check for LDoms
+if [[ "$arch" == sparc* && -c ${root}/dev/mdesc ]]; then
+    echo ldoms
+    if [[ -d ${root}/sys/class/vlds/ctrl && \
+             -d ${root}/sys/class/vlds/sp ]]; then
+        echo ldoms-control
+    else
+        echo ldoms-guest
+    fi
+    MDPROP="${root}/usr/lib/ldoms/mdprop.py"
+    if [[ -x ${MDPROP} ]]; then
+        if [[ -n $($MDPROP -v iodevice device-type=pciex) ]]; then
+            echo ldoms-root
+            echo ldoms-io
+        elif [[ -n $($MDPROP -v iov-device vf-id=0) ]]; then
+            echo ldoms-io
+        fi
+    fi
+fi
diff --git a/virt-what.pod b/virt-what.pod
index 272be70..99fdebe 100644
--- a/virt-what.pod
+++ b/virt-what.pod
@@ -87,6 +87,37 @@ hardware partitioning system.
 
 Status: confirmed by RWMJ using a Fedora guest running in z/VM
 
+=item B<ldoms>
+
+The guest appears to be running on an Linux SPARC system with
+Oracle VM Server for SPARC (Logical Domains) support.
+
+Status: contributed by Darren Kenny
+
+=item B<ldoms-control>
+
+The is the Oracle VM Server for SPARC (Logical Domains) control domain.
+
+Status: contributed by Darren Kenny
+
+=item B<ldoms-guest>
+
+The is the Oracle VM Server for SPARC (Logical Domains) guest domain.
+
+Status: contributed by Darren Kenny
+
+=item B<ldoms-io>
+
+The is the Oracle VM Server for SPARC (Logical Domains) I/O domain.
+
+Status: contributed by Darren Kenny
+
+=item B<ldoms-root>
+
+The is the Oracle VM Server for SPARC (Logical Domains) Root domain.
+
+Status: contributed by Darren Kenny
+
 =item B<linux_vserver>
 
 This is printed for backwards compatibility with older virt-what which
-- 
2.9.3

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux