Skip to content

Commit fcc6dd4

Browse files
Sebastian OttMartin Schwidefsky
authored andcommitted
s390/chsc: query utility strings via fmt3 channel path descriptor
Add support for format 3 channel path descriptors and use them to gather utility strings. Signed-off-by: Sebastian Ott <[email protected]> Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent ded27d8 commit fcc6dd4

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

arch/s390/include/asm/css_chars.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ struct css_general_char {
3232
u32 fcx : 1; /* bit 88 */
3333
u32 : 19;
3434
u32 alt_ssi : 1; /* bit 108 */
35-
u32:1;
36-
u32 narf:1; /* bit 110 */
35+
u32 : 1;
36+
u32 narf : 1; /* bit 110 */
37+
u32 : 12;
38+
u32 util_str : 1;/* bit 123 */
3739
} __packed;
3840

3941
extern struct css_general_char css_general_characteristics;

drivers/s390/cio/chp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ int chp_update_desc(struct channel_path *chp)
431431
* hypervisors implement the required chsc commands.
432432
*/
433433
chsc_determine_fmt1_channel_path_desc(chp->chpid, &chp->desc_fmt1);
434+
chsc_determine_fmt3_channel_path_desc(chp->chpid, &chp->desc_fmt3);
434435
chsc_get_channel_measurement_chars(chp);
435436

436437
return 0;

drivers/s390/cio/chp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ struct channel_path {
4646
int state;
4747
struct channel_path_desc_fmt0 desc;
4848
struct channel_path_desc_fmt1 desc_fmt1;
49+
struct channel_path_desc_fmt3 desc_fmt3;
4950
/* Channel-measurement related stuff: */
5051
int cmg;
5152
int shared;

drivers/s390/cio/chsc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,8 @@ int chsc_determine_channel_path_desc(struct chp_id chpid, int fmt, int rfmt,
915915
return -EINVAL;
916916
if ((rfmt == 2) && !css_general_characteristics.cib)
917917
return -EINVAL;
918+
if ((rfmt == 3) && !css_general_characteristics.util_str)
919+
return -EINVAL;
918920

919921
memset(page, 0, PAGE_SIZE);
920922
scpd_area = page;
@@ -963,6 +965,7 @@ out: \
963965

964966
chsc_det_chp_desc(0, 0)
965967
chsc_det_chp_desc(1, 1)
968+
chsc_det_chp_desc(3, 0)
966969

967970
static void
968971
chsc_initialize_cmg_chars(struct channel_path *chp, u8 cmcv,

drivers/s390/cio/chsc.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ struct channel_path_desc_fmt1 {
4040
u32 zeros[2];
4141
} __attribute__ ((packed));
4242

43+
struct channel_path_desc_fmt3 {
44+
struct channel_path_desc_fmt1 fmt1_desc;
45+
u8 util_str[64];
46+
};
47+
4348
struct channel_path;
4449

4550
struct css_chsc_char {
@@ -151,6 +156,8 @@ int chsc_determine_fmt0_channel_path_desc(struct chp_id chpid,
151156
struct channel_path_desc_fmt0 *desc);
152157
int chsc_determine_fmt1_channel_path_desc(struct chp_id chpid,
153158
struct channel_path_desc_fmt1 *desc);
159+
int chsc_determine_fmt3_channel_path_desc(struct chp_id chpid,
160+
struct channel_path_desc_fmt3 *desc);
154161
void chsc_chp_online(struct chp_id chpid);
155162
void chsc_chp_offline(struct chp_id chpid);
156163
int chsc_get_channel_measurement_chars(struct channel_path *chp);

0 commit comments

Comments
 (0)