aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/uapi/asm
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2015-02-09 08:49:10 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-02-10 10:38:58 -0500
commit34c0dad752294f373a0720840f59e186788ba227 (patch)
tree4d9da02c1edf8c5b4cf57016164747bfabd6faee /arch/s390/include/uapi/asm
parent45cce4ccafe3cddc924ef5221d22b9853fc9a13c (diff)
s390/hypfs: Add diagnose 0c support
With this feature, you can read the CPU performance metrics provided by the z/VM diagnose 0C. This then allows to get the management time for each online CPU of the guest where the diagnose is executed. The new debugfs file /sys/kernel/debug/s390_hypfs/diag_0c exports the diag0C binary data to user space via an open/read/close interface. The binary data consists out of a header structure followed by an array that contains the diagnose 0c data for each online CPU. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/uapi/asm')
-rw-r--r--arch/s390/include/uapi/asm/hypfs.h35
1 files changed, 32 insertions, 3 deletions
diff --git a/arch/s390/include/uapi/asm/hypfs.h b/arch/s390/include/uapi/asm/hypfs.h
index 37998b449531..b3fe12d8dd87 100644
--- a/arch/s390/include/uapi/asm/hypfs.h
+++ b/arch/s390/include/uapi/asm/hypfs.h
@@ -1,16 +1,19 @@
1/* 1/*
2 * IOCTL interface for hypfs 2 * Structures for hypfs interface
3 * 3 *
4 * Copyright IBM Corp. 2013 4 * Copyright IBM Corp. 2013
5 * 5 *
6 * Author: Martin Schwidefsky <schwidefsky@de.ibm.com> 6 * Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
7 */ 7 */
8 8
9#ifndef _ASM_HYPFS_CTL_H 9#ifndef _ASM_HYPFS_H
10#define _ASM_HYPFS_CTL_H 10#define _ASM_HYPFS_H
11 11
12#include <linux/types.h> 12#include <linux/types.h>
13 13
14/*
15 * IOCTL for binary interface /sys/kernel/debug/diag_304
16 */
14struct hypfs_diag304 { 17struct hypfs_diag304 {
15 __u32 args[2]; 18 __u32 args[2];
16 __u64 data; 19 __u64 data;
@@ -22,4 +25,30 @@ struct hypfs_diag304 {
22#define HYPFS_DIAG304 \ 25#define HYPFS_DIAG304 \
23 _IOWR(HYPFS_IOCTL_MAGIC, 0x20, struct hypfs_diag304) 26 _IOWR(HYPFS_IOCTL_MAGIC, 0x20, struct hypfs_diag304)
24 27
28/*
29 * Structures for binary interface /sys/kernel/debug/diag_0c
30 */
31struct hypfs_diag0c_hdr {
32 __u64 len; /* Length of diag0c buffer without header */
33 __u16 version; /* Version of header */
34 char reserved1[6]; /* Reserved */
35 char tod_ext[16]; /* TOD clock for diag0c */
36 __u64 count; /* Number of entries (CPUs) in diag0c array */
37 char reserved2[24]; /* Reserved */
38};
39
40struct hypfs_diag0c_entry {
41 char date[8]; /* MM/DD/YY in EBCDIC */
42 char time[8]; /* HH:MM:SS in EBCDIC */
43 __u64 virtcpu; /* Virtual time consumed by the virt CPU (us) */
44 __u64 totalproc; /* Total of virtual and simulation time (us) */
45 __u32 cpu; /* Linux logical CPU number */
46 __u32 reserved; /* Align to 8 byte */
47};
48
49struct hypfs_diag0c_data {
50 struct hypfs_diag0c_hdr hdr; /* 64 byte header */
51 struct hypfs_diag0c_entry entry[]; /* diag0c entry array */
52};
53
25#endif 54#endif