/[packages]/cauldron/kernel/current/PATCHES/patches/0012-s390-sthyi-Fix-machine-name-validity-indication.patch
ViewVC logotype

Contents of /cauldron/kernel/current/PATCHES/patches/0012-s390-sthyi-Fix-machine-name-validity-indication.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (show annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 9 months ago) by tmb
File size: 1930 byte(s)
add fixes from sashas autosel queue
1 From 8a5e50e5ceb338a5d0f0ef0255633755dc6f8ac7 Mon Sep 17 00:00:00 2001
2 From: Janosch Frank <frankja@linux.ibm.com>
3 Date: Tue, 2 Oct 2018 10:57:52 +0200
4 Subject: [PATCH 012/145] s390/sthyi: Fix machine name validity indication
5
6 [ Upstream commit b5130dc2224d1881f24224c0590c6d97f2168d6a ]
7
8 When running as a level 3 guest with no host provided sthyi support
9 sclp_ocf_cpc_name_copy() will only return zeroes. Zeroes are not a
10 valid group name, so let's not indicate that the group name field is
11 valid.
12
13 Also the group name is not dependent on stsi, let's not return based
14 on stsi before setting it.
15
16 Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation")
17 Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
18 Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
19 Signed-off-by: Sasha Levin <sashal@kernel.org>
20 ---
21 arch/s390/kernel/sthyi.c | 8 +++++---
22 1 file changed, 5 insertions(+), 3 deletions(-)
23
24 diff --git a/arch/s390/kernel/sthyi.c b/arch/s390/kernel/sthyi.c
25 index 0859cde36f75..888cc2f166db 100644
26 --- a/arch/s390/kernel/sthyi.c
27 +++ b/arch/s390/kernel/sthyi.c
28 @@ -183,17 +183,19 @@ static void fill_hdr(struct sthyi_sctns *sctns)
29 static void fill_stsi_mac(struct sthyi_sctns *sctns,
30 struct sysinfo_1_1_1 *sysinfo)
31 {
32 + sclp_ocf_cpc_name_copy(sctns->mac.infmname);
33 + if (*(u64 *)sctns->mac.infmname != 0)
34 + sctns->mac.infmval1 |= MAC_NAME_VLD;
35 +
36 if (stsi(sysinfo, 1, 1, 1))
37 return;
38
39 - sclp_ocf_cpc_name_copy(sctns->mac.infmname);
40 -
41 memcpy(sctns->mac.infmtype, sysinfo->type, sizeof(sctns->mac.infmtype));
42 memcpy(sctns->mac.infmmanu, sysinfo->manufacturer, sizeof(sctns->mac.infmmanu));
43 memcpy(sctns->mac.infmpman, sysinfo->plant, sizeof(sctns->mac.infmpman));
44 memcpy(sctns->mac.infmseq, sysinfo->sequence, sizeof(sctns->mac.infmseq));
45
46 - sctns->mac.infmval1 |= MAC_ID_VLD | MAC_NAME_VLD;
47 + sctns->mac.infmval1 |= MAC_ID_VLD;
48 }
49
50 static void fill_stsi_par(struct sthyi_sctns *sctns,
51 --
52 2.19.1
53

  ViewVC Help
Powered by ViewVC 1.1.30