2012-08-27 09:54:37 +00:00
|
|
|
From 911c72bbf7ae362111593e82c4dfe730a44a1e8f Mon Sep 17 00:00:00 2001
|
|
|
|
From: Dan Horak <dan@danny.cz>
|
|
|
|
Date: Sun, 20 Jul 2008 09:24:05 +0200
|
2012-09-17 08:17:26 +00:00
|
|
|
Subject: [PATCH 1/6] s390-tools-1.5.3-zipl-zfcpdump-2
|
2012-08-27 09:54:37 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
common.mak | 4 ++--
|
|
|
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/common.mak b/common.mak
|
|
|
|
index 5321ccb..541a232 100644
|
|
|
|
--- a/common.mak
|
|
|
|
+++ b/common.mak
|
|
|
|
@@ -62,8 +62,8 @@ GROUP = $(shell id -gn)
|
|
|
|
export INSTROOT BINDIR LIBDIR MANDIR OWNER GROUP
|
|
|
|
|
|
|
|
# Special defines for zfcpdump
|
|
|
|
-ZFCPDUMP_DIR = /usr/local/share/zfcpdump
|
|
|
|
-ZFCPDUMP_IMAGE = zfcpdump.image
|
|
|
|
+ZFCPDUMP_DIR = /boot
|
|
|
|
+ZFCPDUMP_IMAGE = zfcpdump
|
|
|
|
ZFCPDUMP_RD = zfcpdump.rd
|
|
|
|
export ZFCPDUMP_DIR ZFCPDUMP_IMAGE ZFCPDUMP_RD
|
|
|
|
|
|
|
|
--
|
|
|
|
1.7.7.6
|
|
|
|
|
|
|
|
|
|
|
|
From d8a4a2d505564e597cefab16871c35cfb6f06854 Mon Sep 17 00:00:00 2001
|
|
|
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
|
|
|
Date: Thu, 23 Apr 2009 11:46:01 +0200
|
2012-09-17 08:17:26 +00:00
|
|
|
Subject: [PATCH 2/6] s390-tools-1.8.1-fdasd-su
|
2012-08-27 09:54:37 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
fdasd/fdasd.c | 10 ++++++----
|
|
|
|
1 files changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/fdasd/fdasd.c b/fdasd/fdasd.c
|
|
|
|
index 842e72a..3ab81c0 100644
|
|
|
|
--- a/fdasd/fdasd.c
|
|
|
|
+++ b/fdasd/fdasd.c
|
|
|
|
@@ -2104,10 +2104,12 @@ fdasd_get_geometry (fdasd_anchor_t *anc)
|
|
|
|
if (anc->verbose) printf("disk type check : ok\n");
|
|
|
|
|
|
|
|
if (dasd_info.FBA_layout != 0) {
|
|
|
|
- snprintf(err_str, ERROR_STRING_SIZE,
|
|
|
|
- "%s is not formatted with z/OS compatible "
|
|
|
|
- "disk layout!", options.device);
|
|
|
|
- fdasd_error(anc, wrong_disk_format, err_str);
|
|
|
|
+ if(!anc->silent) {
|
|
|
|
+ snprintf(err_str, ERROR_STRING_SIZE,
|
|
|
|
+ "%s is not formatted with z/OS compatible "
|
|
|
|
+ "disk layout!", options.device);
|
|
|
|
+ fdasd_error(anc, wrong_disk_format, err_str);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
if (anc->verbose) printf("disk layout check : ok\n");
|
|
|
|
--
|
|
|
|
1.7.7.6
|
|
|
|
|
|
|
|
|
|
|
|
From 39ac18ef1622f4ae1254983530e120a7d036aff7 Mon Sep 17 00:00:00 2001
|
|
|
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
|
|
|
Date: Fri, 19 Jun 2009 10:01:30 +0200
|
2012-09-17 08:17:26 +00:00
|
|
|
Subject: [PATCH 3/6] s390-tools-1.8.1-zipl-kdump-man
|
2012-08-27 09:54:37 +00:00
|
|
|
|
|
|
|
Description: Add kdump kernel installation instruction to zipl man page.
|
|
|
|
Symptom: User wants to prepare SCSI disk for dump, but has not installed
|
|
|
|
the kdump kernel rpm.
|
|
|
|
Problem: The installation of the kdump kernel rpm is prereq for preparing
|
|
|
|
a SCSI dump disk for dump.
|
|
|
|
Solution: Document that in the zipl man page.
|
|
|
|
---
|
|
|
|
zipl/man/zipl.8 | 2 ++
|
|
|
|
1 files changed, 2 insertions(+), 0 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/zipl/man/zipl.8 b/zipl/man/zipl.8
|
|
|
|
index 01d18c5..e699b59 100644
|
|
|
|
--- a/zipl/man/zipl.8
|
|
|
|
+++ b/zipl/man/zipl.8
|
|
|
|
@@ -271,6 +271,8 @@ will be incomplete.
|
|
|
|
It is not possible to specify both this parameter and the name of a menu
|
|
|
|
or configuration section on the command line at the same time.
|
|
|
|
|
|
|
|
+.B Note that before using this option the "kernel-kdump" rpm has to be
|
|
|
|
+.B installed.
|
|
|
|
.TP
|
|
|
|
.BR "\-M <DUMPLIST[,SIZE]>" " or " "--mvdump=<DUMPLIST[,SIZE]>"
|
|
|
|
Install a multi-volume dump record on each device associated with one of the
|
|
|
|
--
|
|
|
|
1.7.7.6
|
|
|
|
|
|
|
|
|
|
|
|
From 0dc93d3f17430677e1e218124bef32730d4f35ea Mon Sep 17 00:00:00 2001
|
|
|
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
|
|
|
Date: Tue, 21 Aug 2012 09:58:21 +0200
|
2012-09-17 08:17:26 +00:00
|
|
|
Subject: [PATCH 4/6] Support for new storage device on System z (rhbz#847086)
|
2012-08-27 09:54:37 +00:00
|
|
|
|
|
|
|
Allow Linux to access a new storage device as a block device using a new interface.
|
|
|
|
That includes the adaption of common IO functions to allow to attach, configure
|
|
|
|
and operate the new subchannels.
|
|
|
|
---
|
|
|
|
zconf/Makefile | 4 +-
|
|
|
|
zconf/lscss | 45 +++++++++++++++++++++++++++++---
|
|
|
|
zconf/lscss.8 | 4 +++
|
|
|
|
zconf/lsscm | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
zconf/lsscm.8 | 67 ++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
5 files changed, 191 insertions(+), 6 deletions(-)
|
|
|
|
create mode 100644 zconf/lsscm
|
|
|
|
create mode 100644 zconf/lsscm.8
|
|
|
|
|
|
|
|
diff --git a/zconf/Makefile b/zconf/Makefile
|
|
|
|
index ebd1713..ee8fc0e 100644
|
|
|
|
--- a/zconf/Makefile
|
|
|
|
+++ b/zconf/Makefile
|
|
|
|
@@ -4,11 +4,11 @@
|
|
|
|
include ../common.mak
|
|
|
|
|
|
|
|
SCRIPTS = lsdasd lstape lscss chccwdev lsqeth lszfcp lschp chchp lszcrypt \
|
|
|
|
- chzcrypt cio_ignore znetconf dasdstat
|
|
|
|
+ chzcrypt cio_ignore znetconf dasdstat lsscm
|
|
|
|
USRSBIN_SCRIPTS = lsmem chmem lsluns
|
|
|
|
MANPAGES= lsdasd.8 lstape.8 lscss.8 chccwdev.8 lsqeth.8 lszfcp.8 lschp.8 \
|
|
|
|
chchp.8 lszcrypt.8 chzcrypt.8 lsluns.8 cio_ignore.8 znetconf.8 \
|
|
|
|
- chmem.8 lsmem.8 dasdstat.8
|
|
|
|
+ chmem.8 lsmem.8 dasdstat.8 lsscm.8
|
|
|
|
|
|
|
|
all:
|
|
|
|
|
|
|
|
diff --git a/zconf/lscss b/zconf/lscss
|
|
|
|
index d506c57..eaa5e52 100755
|
|
|
|
--- a/zconf/lscss
|
|
|
|
+++ b/zconf/lscss
|
|
|
|
@@ -62,6 +62,8 @@ function print_usage() {
|
|
|
|
Show IO subchannels. (default)
|
|
|
|
--chsc
|
|
|
|
Show CHSC subchannels.
|
|
|
|
+ --eadm
|
|
|
|
+ Show EADM subchannels.
|
|
|
|
-a|--all
|
|
|
|
Show subchannels of all types.
|
|
|
|
EOD
|
|
|
|
@@ -76,10 +78,11 @@ function print_version()
|
|
|
|
|
|
|
|
SUBCHANNEL_TYPE_IO=0
|
|
|
|
SUBCHANNEL_TYPE_CHSC=1
|
|
|
|
+SUBCHANNEL_TYPE_EADM=3
|
|
|
|
|
|
|
|
IDFORMAT=[[:xdigit:]]*.[0-3].[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]
|
|
|
|
|
|
|
|
-unset SCH_IO SCH_CHSC SHOW_AVAIL UPPERCASE SHORTID DEVTYPES DEVRANGE RANGE
|
|
|
|
+unset SCH_IO SCH_CHSC SCH_EADM SHOW_AVAIL UPPERCASE SHORTID DEVTYPES DEVRANGE RANGE
|
|
|
|
shopt -s nocasematch
|
|
|
|
shopt -s nullglob
|
|
|
|
|
|
|
|
@@ -179,9 +182,13 @@ while [ $# -gt 0 ]; do
|
|
|
|
--chsc)
|
|
|
|
SCH_CHSC=true
|
|
|
|
;;
|
|
|
|
+ --eadm)
|
|
|
|
+ SCH_EADM=true
|
|
|
|
+ ;;
|
|
|
|
-a|--all)
|
|
|
|
SCH_IO=true
|
|
|
|
SCH_CHSC=true
|
|
|
|
+ SCH_EADM=true
|
|
|
|
;;
|
|
|
|
--avail)
|
|
|
|
SHOW_AVAIL=true
|
|
|
|
@@ -209,7 +216,7 @@ if [ $RANGE ] ;then
|
|
|
|
parse_ranges $RANGE
|
|
|
|
fi
|
|
|
|
|
|
|
|
-if [ ! \( "$SCH_IO" -o "$SCH_CHSC" \) ] ;then
|
|
|
|
+if [ ! \( "$SCH_IO" -o "$SCH_CHSC" -o "$SCH_EADM" \) ] ;then
|
|
|
|
SCH_IO=true
|
|
|
|
fi
|
|
|
|
|
|
|
|
@@ -343,8 +350,24 @@ function print_chsc()
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
+function print_eadm()
|
|
|
|
+{
|
|
|
|
+ list_sch_of_type $SUBCHANNEL_TYPE_EADM |
|
|
|
|
+ while read DEV ;do
|
|
|
|
+ SCH=${DEV%/*}
|
|
|
|
+ SCH=${SCH##*/}
|
|
|
|
+ if [ $SHORTID ] ;then
|
|
|
|
+ if [ ${SCH:0:4} != "0.0." ] ;then
|
|
|
|
+ continue
|
|
|
|
+ fi
|
|
|
|
+ SCH=${SCH#0.0.}
|
|
|
|
+ fi
|
|
|
|
+ printf "%-8.8s %-8.8s\n" "n/a" $SCH
|
|
|
|
+ done
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
if [ $SCH_IO ] ;then
|
|
|
|
- if [ "$SCH_CHSC" ] ;then
|
|
|
|
+ if [ \( "$SCH_CHSC" -o "$SCH_EADM" \) ] ;then
|
|
|
|
echo "IO Subchannels and Devices:"
|
|
|
|
fi
|
|
|
|
if [ $SHOW_AVAIL ] ;then
|
|
|
|
@@ -362,7 +385,7 @@ if [ $SCH_IO ] ;then
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $SCH_CHSC ] ;then
|
|
|
|
- if [ "$SCH_IO" ] ;then
|
|
|
|
+ if [ \( "$SCH_IO" -o "$SCH_EADM" \) ] ;then
|
|
|
|
echo
|
|
|
|
echo "CHSC Subchannels:"
|
|
|
|
fi
|
|
|
|
@@ -374,3 +397,17 @@ if [ $SCH_CHSC ] ;then
|
|
|
|
cat -
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
+
|
|
|
|
+if [ $SCH_EADM ] ;then
|
|
|
|
+ if [ \( "$SCH_IO" -o "$SCH_CHSC" \) ] ;then
|
|
|
|
+ echo
|
|
|
|
+ echo "EADM Subchannels:"
|
|
|
|
+ fi
|
|
|
|
+ echo "Device Subchan."
|
|
|
|
+ echo "-----------------"
|
|
|
|
+ print_eadm | if [ $UPPERCASE ] ;then
|
|
|
|
+ tr "[:lower:]" "[:upper:]"
|
|
|
|
+ else
|
|
|
|
+ cat -
|
|
|
|
+ fi
|
|
|
|
+fi
|
|
|
|
diff --git a/zconf/lscss.8 b/zconf/lscss.8
|
|
|
|
index 2bef171..46adfe0 100644
|
|
|
|
--- a/zconf/lscss.8
|
|
|
|
+++ b/zconf/lscss.8
|
|
|
|
@@ -61,6 +61,10 @@ Show IO subchannels. (default)
|
|
|
|
Show CHSC subchannels.
|
|
|
|
|
|
|
|
.TP 8
|
|
|
|
+.BR --eadm
|
|
|
|
+Show EADM subchannels.
|
|
|
|
+
|
|
|
|
+.TP 8
|
|
|
|
.BR -a | --all
|
|
|
|
Show subchannels of all types.
|
|
|
|
|
|
|
|
diff --git a/zconf/lsscm b/zconf/lsscm
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000..b436e62
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/zconf/lsscm
|
|
|
|
@@ -0,0 +1,77 @@
|
|
|
|
+#!/bin/bash
|
|
|
|
+
|
|
|
|
+CMD=${0##*/}
|
|
|
|
+VERSION="%S390_TOOLS_VERSION%"
|
|
|
|
+
|
|
|
|
+function print_help()
|
|
|
|
+{
|
|
|
|
+ cat <<-EOD
|
|
|
|
+Usage: $CMD <options>
|
|
|
|
+
|
|
|
|
+List information about available Storage Class Memory Increments.
|
|
|
|
+
|
|
|
|
+<options>
|
|
|
|
+ -h|--help
|
|
|
|
+ Print this help, then exit.
|
|
|
|
+ -v|--version
|
|
|
|
+ Print version information, then exit.
|
|
|
|
+EOD
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function print_version()
|
|
|
|
+{
|
|
|
|
+ echo -ne "$CMD: version $VERSION\nCopyright IBM Corp. 2012\n"
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+# Parse command line parameters
|
|
|
|
+while [ $# -gt 0 ]; do
|
|
|
|
+ case $1 in
|
|
|
|
+ -h|--help)
|
|
|
|
+ print_help
|
|
|
|
+ exit 0
|
|
|
|
+ ;;
|
|
|
|
+ -v|--version)
|
|
|
|
+ print_version
|
|
|
|
+ exit 0
|
|
|
|
+ ;;
|
|
|
|
+ -*|--*)
|
|
|
|
+ echo "$CMD: Invalid option $1" >&2
|
|
|
|
+ echo "Try '$CMD --help' for more information." >&2
|
|
|
|
+ exit 1
|
|
|
|
+ ;;
|
|
|
|
+ *)
|
|
|
|
+ echo "$CMD: Invalid argument $1" >&2
|
|
|
|
+ echo "Try '$CMD --help' for more information." >&2
|
|
|
|
+ exit 1
|
|
|
|
+ ;;
|
|
|
|
+ esac
|
|
|
|
+ shift
|
|
|
|
+done
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+echo "SCM Increment Size Name Rank D_state O_state Pers ResID"
|
|
|
|
+echo "--------------------------------------------------------------"
|
|
|
|
+find /sys/bus/scm/devices/ -type l 2> /dev/null | sort -t/ -k6 |
|
|
|
|
+while read SCM ;do
|
|
|
|
+ ADDR=${SCM##*/}
|
|
|
|
+ BLKDIR=$SCM/block/scm*
|
|
|
|
+ if [ -d $BLKDIR ] ;then
|
|
|
|
+ set - $BLKDIR
|
|
|
|
+ NAME=${1##*/}
|
|
|
|
+ else
|
|
|
|
+ NAME="N/A"
|
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
+ read SIZE 2> /dev/null < $BLKDIR/size || SIZE=0
|
|
|
|
+ SIZE=$((SIZE/2048)) # (SIZE * 512) / 1024^2
|
|
|
|
+
|
|
|
|
+ read RANK 2> /dev/null < $SCM/rank || continue
|
|
|
|
+ read DSTATE 2> /dev/null < $SCM/data_state || continue
|
|
|
|
+ read OSTATE 2> /dev/null < $SCM/oper_state || continue
|
|
|
|
+ read PERS 2> /dev/null < $SCM/persistence || continue
|
|
|
|
+ read RES 2> /dev/null < $SCM/res_id || continue
|
|
|
|
+
|
|
|
|
+ printf "%s %5sMB %-5.5s %4d %7d %7d %4d %5d\n" \
|
|
|
|
+ "$ADDR" "$SIZE" "$NAME" "$RANK" "$DSTATE" "$OSTATE" "$PERS" "$RES"
|
|
|
|
+done
|
|
|
|
diff --git a/zconf/lsscm.8 b/zconf/lsscm.8
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000..25a8a2a
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/zconf/lsscm.8
|
|
|
|
@@ -0,0 +1,67 @@
|
|
|
|
+.TH LSCHP 8 "Jul 2012" s390\-tools
|
|
|
|
+
|
|
|
|
+.SH NAME
|
|
|
|
+lsscm \- list information about available Storage Class Memory Increments.
|
|
|
|
+
|
|
|
|
+.SH SYNOPSIS
|
|
|
|
+.B lsscm
|
|
|
|
+.RB [ \-h|\-\-help ]
|
|
|
|
+.RB [ \-v|\-\-version ]
|
|
|
|
+
|
|
|
|
+.SH DESCRIPTION
|
|
|
|
+The lsscm command lists status and information about available
|
|
|
|
+Storage Class Memory Increments.
|
|
|
|
+
|
|
|
|
+.B Column description:
|
|
|
|
+
|
|
|
|
+SCM Increment
|
|
|
|
+.RS
|
|
|
|
+Starting address of the SCM increment.
|
|
|
|
+.RE
|
|
|
|
+
|
|
|
|
+Size
|
|
|
|
+.RS
|
|
|
|
+Size of the block device representing the SCM increment.
|
|
|
|
+.RE
|
|
|
|
+
|
|
|
|
+Name
|
|
|
|
+.RS
|
|
|
|
+Name of the block device representing the SCM increment.
|
|
|
|
+.RE
|
|
|
|
+
|
|
|
|
+Rank
|
|
|
|
+.RS
|
|
|
|
+Rank (conceptual quality) of the SCM increment.
|
|
|
|
+.RE
|
|
|
|
+
|
|
|
|
+D_state
|
|
|
|
+.RS
|
|
|
|
+Data state of the SCM increment.
|
|
|
|
+.RE
|
|
|
|
+
|
|
|
|
+O_state
|
|
|
|
+.RS
|
|
|
|
+Operation state of the SCM increment.
|
|
|
|
+.RE
|
|
|
|
+
|
|
|
|
+Pers
|
|
|
|
+.RS
|
|
|
|
+Persistence attribute.
|
|
|
|
+.RE
|
|
|
|
+
|
|
|
|
+ResID
|
|
|
|
+.RS
|
|
|
|
+Resource identifier.
|
|
|
|
+.RE
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+.SH OPTIONS
|
|
|
|
+.B \-h | \-\-help
|
|
|
|
+.RS
|
|
|
|
+Print a short help text, then exit.
|
|
|
|
+.RE
|
|
|
|
+
|
|
|
|
+.B \-v | \-\-version
|
|
|
|
+.RS
|
|
|
|
+Print version number, then exit.
|
|
|
|
+.RE
|
|
|
|
--
|
|
|
|
1.7.7.6
|
|
|
|
|
2012-08-27 14:37:41 +00:00
|
|
|
|
|
|
|
From 93b91117cbe2c0d036bf10a8cc139bee2ba94caf Mon Sep 17 00:00:00 2001
|
|
|
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
|
|
|
Date: Mon, 27 Aug 2012 16:34:25 +0200
|
2012-09-17 08:17:26 +00:00
|
|
|
Subject: [PATCH 5/6] lszcrypt/chzcrypt: Add support for CEX4 crypto card
|
2012-08-27 14:37:41 +00:00
|
|
|
(rhbz#847092)
|
|
|
|
|
|
|
|
---
|
|
|
|
zconf/chzcrypt | 3 +
|
|
|
|
zconf/lszcrypt | 131 ++++++++++++++++++++++++++++++++++++++++++++++--------
|
|
|
|
zconf/lszcrypt.8 | 89 ++++++++++++++++++++++++++++---------
|
|
|
|
3 files changed, 183 insertions(+), 40 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/zconf/chzcrypt b/zconf/chzcrypt
|
|
|
|
index e222d43..1a9f574 100755
|
|
|
|
--- a/zconf/chzcrypt
|
|
|
|
+++ b/zconf/chzcrypt
|
|
|
|
@@ -246,6 +246,9 @@ for DEV in $DEV_LIST ; do
|
|
|
|
echo "$CMD: error - cryptographic adapter $CARD does not exist!" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
+ if [ ! -w $DEV/online ] ; then
|
|
|
|
+ continue
|
|
|
|
+ fi
|
|
|
|
verbose "Setting cryptographic adapter $CARD $ONLINE_TEXT."
|
|
|
|
echo $ONLINE > "$DEV/online" 2> /dev/null
|
|
|
|
if [ "$( cat $DEV/online )" != "$ONLINE" ] ; then
|
|
|
|
diff --git a/zconf/lszcrypt b/zconf/lszcrypt
|
|
|
|
index a0c9473..2a371d4 100755
|
|
|
|
--- a/zconf/lszcrypt
|
|
|
|
+++ b/zconf/lszcrypt
|
|
|
|
@@ -1,6 +1,6 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#==============================================================================
|
|
|
|
-# Copyright IBM Corp. 2008.
|
|
|
|
+# Copyright IBM Corp. 2012.
|
|
|
|
#
|
|
|
|
# lszcrypt
|
|
|
|
#
|
|
|
|
@@ -8,6 +8,7 @@
|
|
|
|
#
|
|
|
|
# Author(s): Ralph Wuerthner <rwuerthn@de.ibm.com>
|
|
|
|
# Felix Beck <felix.beck@de.ibm.com>
|
|
|
|
+# Holger Dengler <hd@linux.vnet.ibm.com>
|
|
|
|
#
|
|
|
|
# This file is part of s390-tools
|
|
|
|
#
|
|
|
|
@@ -28,17 +29,29 @@
|
|
|
|
|
|
|
|
CMD="$( basename $0 )"
|
|
|
|
|
|
|
|
+CAP_RSA2K="RSA 2K Clear Key"
|
|
|
|
+CAP_RSA4K="RSA 4K Clear Key"
|
|
|
|
+CAP_CCA="CCA Secure Key"
|
|
|
|
+CAP_RNG="Long RNG"
|
|
|
|
+
|
|
|
|
+let MASK_RSA4K=0x60000000
|
|
|
|
+let MASK_COPRO=0x10000000
|
|
|
|
+let MASK_ACCEL=0x08000000
|
|
|
|
+
|
|
|
|
function print_usage() {
|
|
|
|
cat <<-EOF
|
|
|
|
Usage: $CMD [<options>] [<cryptographic adapter ids>]
|
|
|
|
+ $CMD -c|--capability <cryptographic adapter id>
|
|
|
|
Display zcrypt device and configuration information.
|
|
|
|
|
|
|
|
<options>
|
|
|
|
-b|--bus
|
|
|
|
Show AP bus attributes and exit.
|
|
|
|
+ -c|--capability <cryptographic adapter id>
|
|
|
|
+ Shows the capabilities of a cryptographic adapter.
|
|
|
|
-V|--verbose
|
|
|
|
Increase verbose level for cryptographic adapter information. Maximum
|
|
|
|
- verbose level is two.
|
|
|
|
+ verbose level is three.
|
|
|
|
-v|--version
|
|
|
|
Show version information and exit.
|
|
|
|
-h|--help
|
|
|
|
@@ -46,14 +59,14 @@ function print_usage() {
|
|
|
|
|
|
|
|
<cryptographic adapter ids>
|
|
|
|
List of cryptographic adapter ids separated by blanks which will be displayed.
|
|
|
|
- If not ids are given all available adapters are displayed.
|
|
|
|
+ If no ids are given all available adapters are displayed.
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
function print_version() {
|
|
|
|
cat <<-EOF
|
|
|
|
$CMD: version %S390_TOOLS_VERSION%
|
|
|
|
- Copyright IBM Corp. 2007
|
|
|
|
+ Copyright IBM Corp. 2012
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -89,6 +102,65 @@ show_bus() {
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
+show_capability() {
|
|
|
|
+ CARD="$( printf "card%02x" "$1" 2> /dev/null )"
|
|
|
|
+ DEV=$SYSFS/devices/ap/$CARD
|
|
|
|
+ if [ ! -d $DEV ] ; then
|
|
|
|
+ echo "$CMD: error - cryptographic adapter $CARD does not exist!" >&2
|
|
|
|
+ exit 1
|
|
|
|
+ fi
|
|
|
|
+ HWTYPE="$( cat $DEV/hwtype 2> /dev/null )"
|
|
|
|
+ FUNCS="$( cat $DEV/ap_functions 2> /dev/null )"
|
|
|
|
+ # If sysfs attribute is missing, set functions to 0
|
|
|
|
+ if [ "x"$FUNCS == "x" ] ; then
|
|
|
|
+ FUNCS="0x00000000"
|
|
|
|
+ fi
|
|
|
|
+ # skip devices, which are not supported by zcrypt layer
|
|
|
|
+ if [ ! -r $DEV/type -a ! -r $DEV/online ] ; then
|
|
|
|
+ CAPS="Detailed capability information for $CARD"
|
|
|
|
+ CAPS+=" (hardware type $HWTYPE) is not available."
|
|
|
|
+ echo -e $CAPS
|
|
|
|
+ return;
|
|
|
|
+ fi
|
|
|
|
+ let FUNC_VAL=$FUNCS
|
|
|
|
+ CAPS="$CARD provides capability for:\n"
|
|
|
|
+ case $HWTYPE in
|
|
|
|
+ 6|8)
|
|
|
|
+ if (( FUNC_VAL&$MASK_RSA4K )) ; then
|
|
|
|
+ CAPS+="$CAP_RSA4K"
|
|
|
|
+ else
|
|
|
|
+ CAPS+="$CAP_RSA2K"
|
|
|
|
+ fi
|
|
|
|
+ ;;
|
|
|
|
+ 7|9)
|
|
|
|
+ CAPS+="$CAP_RSA4K\n"
|
|
|
|
+ CAPS+="$CAP_CCA\n"
|
|
|
|
+ CAPS+="$CAP_RNG"
|
|
|
|
+ ;;
|
|
|
|
+ 10)
|
|
|
|
+ if (( FUNC_VAL&$MASK_ACCEL )) ; then
|
|
|
|
+ if (( FUNC_VAL&$MASK_RSA4K )) ; then
|
|
|
|
+ CAPS+="$CAP_RSA4K"
|
|
|
|
+ else
|
|
|
|
+ CAPS+="$CAP_RSA2K"
|
|
|
|
+ fi
|
|
|
|
+ elif (( FUNC_VAL&$MASK_COPRO )) ; then
|
|
|
|
+ CAPS+="$CAP_RSA4K\n"
|
|
|
|
+ CAPS+="$CAP_CCA\n"
|
|
|
|
+ CAPS+="$CAP_RNG"
|
|
|
|
+ else
|
|
|
|
+ CAPS="Detailed capability information for $CARD"
|
|
|
|
+ CAPS+=" (hardware type $HWTYPE) is not available."
|
|
|
|
+ fi
|
|
|
|
+ ;;
|
|
|
|
+ *)
|
|
|
|
+ CAPS="Detailed capability information for $CARD"
|
|
|
|
+ CAPS+=" (hardware type $HWTYPE) is not available."
|
|
|
|
+ ;;
|
|
|
|
+ esac
|
|
|
|
+ echo -e $CAPS
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
show_device() {
|
|
|
|
CARD="$1"
|
|
|
|
DEV="$SYSFS/bus/ap/devices/$CARD"
|
|
|
|
@@ -96,37 +168,48 @@ show_device() {
|
|
|
|
echo "$CMD: error - cryptographic adapter $CARD does not exist!" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
- if [ -r $DEV/type ] ; then
|
|
|
|
- TYPE="$( cat $DEV/type 2> /dev/null )"
|
|
|
|
- else
|
|
|
|
- TYPE=unknown
|
|
|
|
+ if [ ! -r $DEV/type -a ! -r $DEV/online ] ; then
|
|
|
|
+ # skip devices, which are not supported by zcrypt layer
|
|
|
|
+ return;
|
|
|
|
fi
|
|
|
|
- if [ -r $DEV/online ] ; then
|
|
|
|
- if [ "$( cat $DEV/online 2> /dev/null )" -eq 0 ] ; then
|
|
|
|
- ONLINE=offline
|
|
|
|
- else
|
|
|
|
- ONLINE=online
|
|
|
|
- fi
|
|
|
|
+ TYPE="$( cat $DEV/type 2> /dev/null )"
|
|
|
|
+ if [ "$( cat $DEV/online 2> /dev/null )" -eq 0 ] ; then
|
|
|
|
+ ONLINE=offline
|
|
|
|
else
|
|
|
|
- ONLINE=unknown
|
|
|
|
+ ONLINE=online
|
|
|
|
fi
|
|
|
|
case $VERBOSE in
|
|
|
|
0) echo "$CARD: $TYPE"
|
|
|
|
;;
|
|
|
|
1) printf "%s: %-11s %-7s\n" $CARD $TYPE $ONLINE
|
|
|
|
;;
|
|
|
|
- *)
|
|
|
|
+ 2)
|
|
|
|
HWTYPE="$( cat $DEV/hwtype 2> /dev/null )"
|
|
|
|
DEPTH="$( cat $DEV/depth 2> /dev/null )"
|
|
|
|
REQ_CNT="$( cat $DEV/request_count 2> /dev/null )"
|
|
|
|
printf "%s: %-11s %-7s hwtype=%-2d depth=%d request_count=%-10d\n" \
|
|
|
|
$CARD $TYPE $ONLINE $HWTYPE $DEPTH $REQ_CNT
|
|
|
|
+ ;;
|
|
|
|
+ *)
|
|
|
|
+ HWTYPE="$( cat $DEV/hwtype 2> /dev/null )"
|
|
|
|
+ DEPTH="$( cat $DEV/depth 2> /dev/null )"
|
|
|
|
+ REQ_CNT="$( cat $DEV/request_count 2> /dev/null )"
|
|
|
|
+ REQQ_CNT="$( cat $DEV/requestq_count 2> /dev/null )"
|
|
|
|
+ PENQ_CNT="$( cat $DEV/pendingq_count 2> /dev/null )"
|
|
|
|
+ FUNCS="$( cat $DEV/ap_functions 2> /dev/null )"
|
|
|
|
+ FMT="%s: %-11s %-7s hwtype=%-2d depth=%d"
|
|
|
|
+ FMT+=" request_count=%d pendingq_count=%d requestq_count=%d"
|
|
|
|
+ FMT+=" functions=%-10s\n"
|
|
|
|
+ printf "$FMT" \
|
|
|
|
+ $CARD $TYPE $ONLINE $HWTYPE $DEPTH \
|
|
|
|
+ $REQ_CNT $PENQ_CNT $REQQ_CNT \
|
|
|
|
+ $FUNCS
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
# Parse command line
|
|
|
|
-TEMP=`getopt -o bhvV \
|
|
|
|
- --long bus,help,version,verbose \
|
|
|
|
+TEMP=`getopt -o bchvV \
|
|
|
|
+ --long bus,capability,help,version,verbose \
|
|
|
|
-n "$CMD" -- "$@"`
|
|
|
|
if [ $? != 0 ] ; then
|
|
|
|
exit 1
|
|
|
|
@@ -139,6 +222,8 @@ while true ; do
|
|
|
|
case "$1" in
|
|
|
|
-b|--bus) SHOW_BUS=1
|
|
|
|
shift;;
|
|
|
|
+ -c|--capability) SHOW_CAPABILITY=1
|
|
|
|
+ shift;;
|
|
|
|
-h|--help) print_usage
|
|
|
|
exit 0;;
|
|
|
|
-v|--version) print_version
|
|
|
|
@@ -168,7 +253,15 @@ fi
|
|
|
|
if [ -n "$SHOW_BUS" ] ; then
|
|
|
|
show_bus
|
|
|
|
exit 0
|
|
|
|
-fi
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+if [ -n "$SHOW_CAPABILITY" ] ; then
|
|
|
|
+ if [ $# -ne 1 ] ; then
|
|
|
|
+ invalid_cmdline "capability option requires a single cryptographic device id"
|
|
|
|
+ fi
|
|
|
|
+ show_capability $@
|
|
|
|
+ exit 0
|
|
|
|
+fi
|
|
|
|
|
|
|
|
if [ $# -eq 0 ] ; then
|
|
|
|
DEVLIST="$( find $SYSFS/bus/ap/devices -name 'card*' -printf '%f\n' | sort )"
|
|
|
|
diff --git a/zconf/lszcrypt.8 b/zconf/lszcrypt.8
|
|
|
|
index 01d4fa7..e8ca6ce 100644
|
|
|
|
--- a/zconf/lszcrypt.8
|
|
|
|
+++ b/zconf/lszcrypt.8
|
|
|
|
@@ -4,11 +4,15 @@ lszcrypt \- display zcrypt device and configuration information
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.TP 9
|
|
|
|
.B lszcrypt
|
|
|
|
-.RB "[ " -V " | " -VV " ] "
|
|
|
|
+.RB "[ " -V " | " -VV " | " -VVV " ] "
|
|
|
|
[
|
|
|
|
.I <device id>
|
|
|
|
[...]]
|
|
|
|
.TP
|
|
|
|
+.B lszcrypt
|
|
|
|
+.B -c
|
|
|
|
+<device id>
|
|
|
|
+.TP
|
|
|
|
.B lszcrypt -b
|
|
|
|
.TP
|
|
|
|
.B lszcrypt -h
|
|
|
|
@@ -18,50 +22,93 @@ lszcrypt \- display zcrypt device and configuration information
|
|
|
|
The
|
|
|
|
.B lszcrypt
|
|
|
|
command is used to display information about cryptographic adapters managed by
|
|
|
|
-zcrypt and zcrypt's AP bus attributes. Displayed information depends on the
|
|
|
|
+zcrypt and the AP bus attributes of zcrypt. Displayed information depends on the
|
|
|
|
kernel version.
|
|
|
|
.B lszcrypt
|
|
|
|
-requires that the sysfs filesystem is mounted.
|
|
|
|
+requires that sysfs is mounted.
|
|
|
|
.P
|
|
|
|
-The following information can be displayed for each cryptographic adapter: card
|
|
|
|
-type, online status, hardware card type, hardware queue depth, and request
|
|
|
|
-count. The following AP bus attributes can be displayed: AP domain,
|
|
|
|
-configuration timer, poll thread status, poll timeout, and AP interrupt status.
|
|
|
|
+The following information can be displayed for each cryptographic
|
|
|
|
+adapter: card type (symbolic), online status, hardware card
|
|
|
|
+type (numeric), installed function facilities, card capability, hardware
|
|
|
|
+queue depth, request count, number of requests in hardware queue, and
|
|
|
|
+the number of outstanding requests.
|
|
|
|
+The following AP bus attributes can be displayed: AP domain,
|
|
|
|
+configuration timer, poll thread status, poll timeout, and AP interrupt
|
|
|
|
+status.
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP 8
|
|
|
|
.B -V, --verbose
|
|
|
|
-Increase verbose level for cryptographic adapter information. Maximum verbose
|
|
|
|
-level is two. At verbose level one card type and online status are displayed.
|
|
|
|
-At verbose level two card type, online status, hardware card type, hardware
|
|
|
|
-queue depth, and request count are displayed.
|
|
|
|
+Increases the verbose level for cryptographic adapter information.
|
|
|
|
+The maximum verbose level is three. At verbose level one card type
|
|
|
|
+and online status are displayed. At verbose level two card type,
|
|
|
|
+online status, hardware card type, hardware queue depth, and
|
|
|
|
+request count are displayed. At verbose level three card type,
|
|
|
|
+online status, hardware card type, hardware queue depth,
|
|
|
|
+request count, pending request queue count, outstanding
|
|
|
|
+request queue count, and installed function facilities are displayed.
|
|
|
|
.TP 8
|
|
|
|
.B <device id>
|
|
|
|
-Specifies a cryptographic adapter which will be displayed. A cryptographic
|
|
|
|
+Specifies a cryptographic adapter to display. A cryptographic
|
|
|
|
adapter can be specified either in decimal or hexadecimal notation using
|
|
|
|
a '0x' prefix. If no adapters are specified information about all available
|
|
|
|
-adapters will be displayed.
|
|
|
|
+adapters is displayed.
|
|
|
|
.TP 8
|
|
|
|
.B -b, --bus
|
|
|
|
-Show AP bus attributes and exit.
|
|
|
|
+Displays the AP bus attributes and exits.
|
|
|
|
+.TP 8
|
|
|
|
+.B -c, --capability <device id>
|
|
|
|
+Shows the capabilities of a cryptographic adapter of hardware type 6 or
|
|
|
|
+higher. The capabilities of a cryptographic adapter depend on the card
|
|
|
|
+type and the installed function facilities. A cryptographic adapter can
|
|
|
|
+provide one or more of the following capabilities:
|
|
|
|
+.RS
|
|
|
|
+.IP "o" 3
|
|
|
|
+RSA 2K Clear Key
|
|
|
|
+.IP "o"
|
|
|
|
+RSA 4K Clear Key
|
|
|
|
+.IP "o"
|
|
|
|
+CCA Secure Key
|
|
|
|
+.IP "o"
|
|
|
|
+Long RNG
|
|
|
|
+.RE
|
|
|
|
.TP 8
|
|
|
|
.B -h, --help
|
|
|
|
-Print help text and exit.
|
|
|
|
+Displays help text and exits.
|
|
|
|
.TP 8
|
|
|
|
.B -v, --version
|
|
|
|
-Print version information and exit.
|
|
|
|
+Displays version information and exits.
|
|
|
|
.SH EXAMPLES
|
|
|
|
.TP
|
|
|
|
.B lszcrypt -V
|
|
|
|
-Will display card type and online status of all available cryptographic
|
|
|
|
+Displays card type and online status of all available cryptographic
|
|
|
|
adapters.
|
|
|
|
.TP
|
|
|
|
.B lszcrypt -VV 0 1 10 12
|
|
|
|
-Will display card type, online status, hardware card type, hardware queue
|
|
|
|
-depth, and request count for cryptographic adapters in decimal notation 0, 1,
|
|
|
|
-10, and 12.
|
|
|
|
+Displays the card type in hexadecimal notation, online status,
|
|
|
|
+hardware card type, hardware queue depth, and request count for
|
|
|
|
+cryptographic adapters 0, 1, 10, and 12 in decimal notation.
|
|
|
|
+.TP
|
|
|
|
+.B lszcrypt -VVV 3 7 11
|
|
|
|
+Displays the card ID and the installed function facility in
|
|
|
|
+hexadecimal notation, as well as card type, online status, hardware
|
|
|
|
+card type, hardware queue depth, request count, pending request
|
|
|
|
+queue count, and outstanding request queue count for cryptographic
|
|
|
|
+adapters 3, 7, and 11 in decimal notation.
|
|
|
|
.TP
|
|
|
|
.B lszcrypt -b
|
|
|
|
-Will display AP bus information.
|
|
|
|
+Displays AP bus information.
|
|
|
|
+.TP
|
|
|
|
+.B lszcrypt -c 7
|
|
|
|
+.RS
|
|
|
|
+.br
|
|
|
|
+Coprocessor card07 provides capability for:
|
|
|
|
+.br
|
|
|
|
+CCA Secure Key
|
|
|
|
+.br
|
|
|
|
+RSA 4K Clear Key
|
|
|
|
+.br
|
|
|
|
+Long RNG
|
|
|
|
+.RE
|
|
|
|
.SH SEE ALSO
|
|
|
|
\fBchzcrypt\fR(8)
|
|
|
|
.SH AUTHOR
|
|
|
|
--
|
|
|
|
1.7.7.6
|
|
|
|
|
2012-09-17 08:17:26 +00:00
|
|
|
|
|
|
|
From 9cdbb967999268021ca326b405abf01d00d1f7b2 Mon Sep 17 00:00:00 2001
|
|
|
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
|
|
|
Date: Mon, 17 Sep 2012 10:05:47 +0200
|
|
|
|
Subject: [PATCH 6/6] zipl: Flush disk buffers before installing IPL record
|
|
|
|
(rhbz#857814)
|
|
|
|
|
|
|
|
---
|
|
|
|
zipl/src/install.c | 11 +++++++++++
|
|
|
|
1 files changed, 11 insertions(+), 0 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/zipl/src/install.c b/zipl/src/install.c
|
|
|
|
index 87d6243..ca3fc2c 100644
|
|
|
|
--- a/zipl/src/install.c
|
|
|
|
+++ b/zipl/src/install.c
|
|
|
|
@@ -45,6 +45,9 @@ enum scsi_layout {
|
|
|
|
scsi_layout_unknown
|
|
|
|
};
|
|
|
|
|
|
|
|
+/* From linux/fs.h */
|
|
|
|
+#define BLKFLSBUF _IO(0x12, 97)
|
|
|
|
+
|
|
|
|
|
|
|
|
/* Determine SCSI disk layout from the specified BOOTBLOCK. */
|
|
|
|
static enum scsi_layout
|
|
|
|
@@ -275,6 +278,14 @@ install_bootloader(const char *device, disk_blockptr_t *program_table,
|
|
|
|
device);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
+ /* Ensure that potential cache inconsistencies between disk and
|
|
|
|
+ * partition are resolved by flushing the corresponding buffers. */
|
|
|
|
+ if (!dry_run) {
|
|
|
|
+ if (ioctl(fd, BLKFLSBUF)) {
|
|
|
|
+ fprintf(stderr, "Warning: Could not flush disk "
|
|
|
|
+ "caches.\n");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
/* Call disk specific install functions */
|
|
|
|
rc = -1;
|
|
|
|
switch (info->type) {
|
|
|
|
--
|
|
|
|
1.7.7.6
|
|
|
|
|