Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3440451imu; Sun, 11 Nov 2018 15:09:03 -0800 (PST) X-Google-Smtp-Source: AJdET5fa/fX8xQJ3NZ/QoXnWbBVR6AqSTlLU6USPdi6fFBlB0K/1Q06/ubiQY4fC9rrkFJmCEzDh X-Received: by 2002:a63:4384:: with SMTP id q126mr15332546pga.160.1541977743194; Sun, 11 Nov 2018 15:09:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977743; cv=none; d=google.com; s=arc-20160816; b=ZfxYkzJF4hgU/cyvN66myHrjhiBgTdqtI/o65ChWQlC347CvrPNBY1FkSh3yPZumgM dDuGNat0G2nVrHM8JT0R8DPo2f7nVYu5abtXTfona+GzcBWv+pG8kSlHup90KiDvbEqB laDggXSMnPUOhB3cjuedTC9Wg06uqBJCwAqsw0YAd37MH+4fgyWJNdvhUGwtLDNcLIx/ M+wt5iDaGRSrsBX4onMmrYc6ir2j8ckx74c7BdaEd26+81NOHqA3bXeZ1XpslPpJqMZB 1EPgeUrBGg3ureN/TsPFAZp8TYMJFKBkIctEh0QWK2LGgaDVUr9wxMUFOPK1Y5Vyo8Em AMCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Wys3gLtaQvyjdI/XyfuXIFgaCK6L/kXy8g9ZX8V+rNA=; b=UqV36HhuIN58wEmGU66MXYIwKHR3x6Wmt9WMkoeo51mv5bbmnKhir2M6oAmROQJSw1 RtKQ6ZX0z+9rl001PG/Rxi1jMVJXMGNxf7H+oRPWHY9n1HqmgBPzSFtfiVniDXdYyPMB Ihhs+mwEdTA5o6l2PYDHp3OU9reHVGIjQhWnYGn9hUMzax9ISwn8Y/uJy84/03S5eDvP 5+U/vBvO48bFzRx+Pud3Dfd7kV0fmvCkFW3P6v5ei/SQw3R4D9ZNGQrOty1SGdfb2ZMa INn44pnHDZOnHwQl9wGfNXnQka5we3ACPVi2Cr3LgmcTPUR++0H744elkU6br5xR1cos 0DpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KOxOi+Bs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3-v6si16363756pld.329.2018.11.11.15.08.47; Sun, 11 Nov 2018 15:09:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KOxOi+Bs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390422AbeKLI5Y (ORCPT + 99 others); Mon, 12 Nov 2018 03:57:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:51332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390313AbeKLIWK (ORCPT ); Mon, 12 Nov 2018 03:22:10 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F38032243E; Sun, 11 Nov 2018 22:32:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975533; bh=U0if6oX8CIqyrvmBsHluMmRg4mZ2z5vLlk0TCk2sbyA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KOxOi+BsfL7qAtDeINC234AdxaIBW28apR+uGcAzzjG8GD1oD/7AtHtQiyCXIJ9m9 Rg/O8tY4IFBWKlkAj+JVeG8Ba0sD6J/NdD16q+MOYW9VzekMS0CABS5EnS7+aEozWp AQ68xi03QuLFOx+3GwbZb6NBnJ2jGYevfzitNvTc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Janosch Frank , Martin Schwidefsky , Sasha Levin Subject: [PATCH 4.14 044/222] s390/sthyi: Fix machine name validity indication Date: Sun, 11 Nov 2018 14:22:21 -0800 Message-Id: <20181111221652.099965259@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Janosch Frank [ Upstream commit b5130dc2224d1881f24224c0590c6d97f2168d6a ] When running as a level 3 guest with no host provided sthyi support sclp_ocf_cpc_name_copy() will only return zeroes. Zeroes are not a valid group name, so let's not indicate that the group name field is valid. Also the group name is not dependent on stsi, let's not return based on stsi before setting it. Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation") Signed-off-by: Janosch Frank Signed-off-by: Martin Schwidefsky Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/s390/kvm/sthyi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/arch/s390/kvm/sthyi.c +++ b/arch/s390/kvm/sthyi.c @@ -174,17 +174,19 @@ static void fill_hdr(struct sthyi_sctns static void fill_stsi_mac(struct sthyi_sctns *sctns, struct sysinfo_1_1_1 *sysinfo) { + sclp_ocf_cpc_name_copy(sctns->mac.infmname); + if (*(u64 *)sctns->mac.infmname != 0) + sctns->mac.infmval1 |= MAC_NAME_VLD; + if (stsi(sysinfo, 1, 1, 1)) return; - sclp_ocf_cpc_name_copy(sctns->mac.infmname); - memcpy(sctns->mac.infmtype, sysinfo->type, sizeof(sctns->mac.infmtype)); memcpy(sctns->mac.infmmanu, sysinfo->manufacturer, sizeof(sctns->mac.infmmanu)); memcpy(sctns->mac.infmpman, sysinfo->plant, sizeof(sctns->mac.infmpman)); memcpy(sctns->mac.infmseq, sysinfo->sequence, sizeof(sctns->mac.infmseq)); - sctns->mac.infmval1 |= MAC_ID_VLD | MAC_NAME_VLD; + sctns->mac.infmval1 |= MAC_ID_VLD; } static void fill_stsi_par(struct sthyi_sctns *sctns,