From patchwork Mon Feb 19 12:15:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viktor Mihajlovski X-Patchwork-Id: 10227613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6DF97602DC for ; Mon, 19 Feb 2018 12:16:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AB4B28911 for ; Mon, 19 Feb 2018 12:16:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4ECB028A46; Mon, 19 Feb 2018 12:16:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C743228911 for ; Mon, 19 Feb 2018 12:16:41 +0000 (UTC) Received: from localhost ([::1]:49789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enkN6-0002L5-Sp for patchwork-qemu-devel@patchwork.kernel.org; Mon, 19 Feb 2018 07:16:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enkMS-00021n-GC for qemu-devel@nongnu.org; Mon, 19 Feb 2018 07:16:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enkMR-0006En-Ev for qemu-devel@nongnu.org; Mon, 19 Feb 2018 07:16:00 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40700 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1enkMR-0006EO-9h for qemu-devel@nongnu.org; Mon, 19 Feb 2018 07:15:59 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1JC9ChI105545 for ; Mon, 19 Feb 2018 07:15:57 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2g7vtmm00t-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 19 Feb 2018 07:15:56 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Feb 2018 12:15:53 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 19 Feb 2018 12:15:49 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1JCFnO661341742; Mon, 19 Feb 2018 12:15:49 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 014894204C; Mon, 19 Feb 2018 12:08:29 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A51CB42041; Mon, 19 Feb 2018 12:08:28 +0000 (GMT) Received: from [9.152.222.92] (unknown [9.152.222.92]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 19 Feb 2018 12:08:28 +0000 (GMT) From: Viktor Mihajlovski To: Thomas Huth , "Collin L. Walling" , qemu-s390x@nongnu.org, qemu-devel@nongnu.org, borntraeger@de.ibm.com References: <1518818879-18608-1-git-send-email-walling@linux.vnet.ibm.com> <1518818879-18608-6-git-send-email-walling@linux.vnet.ibm.com> <331dee18-2eb2-9189-852b-bf8723c03d27@redhat.com> Date: Mon, 19 Feb 2018 13:15:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-TM-AS-GCONF: 00 x-cbid: 18021912-0040-0000-0000-0000043532D5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18021912-0041-0000-0000-000020D73E44 Message-Id: <8bc5f6a2-275f-8e06-571d-d270deb1fa29@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-19_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802190151 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH v7 05/12] s390-ccw: move auxiliary IPL data to separate location X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: frankja@linux.vnet.ibm.com, alifm@linux.vnet.ibm.com, david@redhat.com, cohuck@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP On 19.02.2018 09:50, Viktor Mihajlovski wrote: > On 17.02.2018 09:11, Thomas Huth wrote: > [...] >> >> I still think that the information should *not* be stored within the >> IplParameterBlock to avoid that we pass it via DIAG 0x308, too. >> If we do it like this, I'm pretty sure that we will look at this code in >> a couple of years and wonder whether we can change it again or whether >> this is an established interface between the host and the guest. So >> please, let's avoid establishing such "hidden" interfaces just out of >> current convenience. There must be a better location for this. >> Christian, do you have an idea? >> >> Thomas >> > In principle I do agree, although I think we can manage the host/guest > boundary. If we believe we can't, we have a much bigger problem (looking > at the position of the iplb smack in the middle of the s390-ipl state). > > The main reason why I didn't bother to introduce a new private field in > s390-ipl was that I expect more changes to the IPL area in the future > (earlier than in a couple of years) and am not really sure whether this > QEMU <-> BIOS interface will remain the same and how much effort to > spend on it. > > The major point of this change is to move non-standard data out of the > guest-visible IPLB to avoid compatibility problems in the future, while > still catering for features like network boot and boot menus. I have no > bias against other solutions achieving this objective. If you and > Christian think we need a new field, it's all right with me. > With below squashed in (and a subsequent fixup for the next patch), we can logically separate the QEMU IPL parameter from the IPLB. Better? diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 31565ce..c5923b5 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -410,7 +410,7 @@ static void s390_ipl_prepare_qipl(S390CPU *cpu) error_report("Cannot set QEMU IPL parameters"); return; } - memcpy(addr + QIPL_ADDRESS, &ipl->iplb.qipl, sizeof(QemuIplParameters)); + memcpy(addr + QIPL_ADDRESS, &ipl->qipl, sizeof(QemuIplParameters)); cpu_physical_memory_unmap(addr, len, 1, len); } @@ -433,7 +433,7 @@ void s390_ipl_prepare_cpu(S390CPU *cpu) error_report_err(err); vm_stop(RUN_STATE_INTERNAL_ERROR); } - ipl->iplb.qipl.netboot_start_addr = cpu_to_be64(ipl->start_addr); + ipl->qipl.netboot_start_addr = cpu_to_be64(ipl->start_addr); } s390_ipl_prepare_qipl(cpu); diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h index 74469b1..775d363 100644 --- a/hw/s390x/ipl.h +++ b/hw/s390x/ipl.h @@ -88,7 +88,6 @@ union IplParameterBlock { IplBlockFcp fcp; IplBlockQemuScsi scsi; }; - QemuIplParameters qipl; } QEMU_PACKED; struct { uint8_t reserved1[110]; @@ -120,6 +119,7 @@ struct S390IPLState { bool iplb_valid; bool reipl_requested; bool netboot; + QemuIplParameters qipl; /*< public >*/ char *kernel;