s390/ipl: ensure loadparm valid flag is set
authorVasily Gorbik <gor@linux.ibm.com>
Tue, 3 Apr 2018 14:02:15 +0000 (16:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Apr 2018 06:56:19 +0000 (08:56 +0200)
commit 15deb080a6087b73089139569558965750e69d67 upstream.

When loadparm is set in reipl parm block, the kernel should also set
DIAG308_FLAGS_LP_VALID flag.

This fixes loadparm ignoring during z/VM fcp -> ccw reipl and kvm direct
boot -> ccw reipl.

Cc: <stable@vger.kernel.org>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kernel/ipl.c

index 8e622bb52f7a95fd59c2f89aec95f04c616633cf..d1a0e2c521d70470e6f9c15b4712de4179db8d0c 100644 (file)
@@ -799,6 +799,7 @@ static ssize_t reipl_generic_loadparm_store(struct ipl_parameter_block *ipb,
        /* copy and convert to ebcdic */
        memcpy(ipb->hdr.loadparm, buf, lp_len);
        ASCEBC(ipb->hdr.loadparm, LOADPARM_LEN);
+       ipb->hdr.flags |= DIAG308_FLAGS_LP_VALID;
        return len;
 }