All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-devel@nongnu.org, borntraeger@de.ibm.com,
	jfrei@linux.vnet.ibm.com, Farhan Ali <alifm@linux.vnet.ibm.com>,
	agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH v2 3/5] s390x/ipl: Load network boot image
Date: Mon, 27 Feb 2017 12:59:36 +0100	[thread overview]
Message-ID: <c0652d8e-399a-411f-b338-e80674ae27c4@redhat.com> (raw)
In-Reply-To: <20170227125138.18c3f43c.cornelia.huck@de.ibm.com>

On 27.02.2017 12:51, Cornelia Huck wrote:
> On Sat, 25 Feb 2017 07:18:29 +0100
> Thomas Huth <thuth@redhat.com> wrote:
> 
>> On 23.02.2017 13:20, Cornelia Huck wrote:
>>> From: Farhan Ali <alifm@linux.vnet.ibm.com>
>>>
>>> Load the network boot image into guest RAM when the boot
>>> device selected is a network device. Use some of the reserved
>>> space in IplBlockCcw to store the start address of the netboot
>>> image.
>>>
>>> A user could also use 'chreipl'(diag 308/5) to change the boot device.
>>> So every time we update the IPLB, we need to verify if the selected
>>> boot device is a network device so we can appropriately load the
>>> network boot image.
>>>
>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>>> ---
>>>  hw/s390x/ipl.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  hw/s390x/ipl.h |  4 ++-
>>>  2 files changed, 92 insertions(+), 1 deletion(-)
[...]
>>> +    if (ipl->netboot) {
>>> +        if (load_netboot_image(&err) < 0) {
>>> +            error_report_err(err);
>>> +            vm_stop(RUN_STATE_INTERNAL_ERROR);
>>> +        }
>>> +        ipl->iplb.ccw.netboot_start_addr = ipl->start_addr;
>>
>> Not sure whether it matters, but in case of early errors during
>> load_netboot_image(), ipl->start_addr could be used uninitialized here.
>> Maybe you should move the "ipl->start_addr = KERN_IMAGE_START;" there at
>> the beginning of the function, to make it also the default value for the
>> other error cases?
> 
> ipl->start_addr has already been set to some value in the realize
> function (either the kernel entry address, or the bios address).
> 
> But that should not matter with the vm_stop() on error anyway, no?

Likely not. It's just a little bit strange to see that the program flow
continues after the error in this function here ... maybe it would have
been clearer to put a "return" right after the "vm_stop()"? Anyway, it
likely does not really matter here, so never mind.

 Thomas

  reply	other threads:[~2017-02-27 11:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 12:20 [Qemu-devel] [PATCH v2 0/5] s390x: network boot Cornelia Huck
2017-02-23 12:20 ` [Qemu-devel] [PATCH v2 1/5] elf-loader: Allow late loading of elf Cornelia Huck
2017-02-25  6:05   ` Thomas Huth
2017-02-27 12:12     ` Cornelia Huck
2017-02-27 15:56   ` Cornelia Huck
2017-02-23 12:20 ` [Qemu-devel] [PATCH v2 2/5] s390x/ipl: Extend S390IPLState to support network boot Cornelia Huck
2017-02-25  6:18   ` Thomas Huth
2017-02-23 12:20 ` [Qemu-devel] [PATCH v2 3/5] s390x/ipl: Load network boot image Cornelia Huck
2017-02-25  6:18   ` Thomas Huth
2017-02-27 11:51     ` Cornelia Huck
2017-02-27 11:59       ` Thomas Huth [this message]
2017-02-23 12:20 ` [Qemu-devel] [PATCH v2 4/5] pc-bios/s390-ccw: Use the ccw bios to start the network boot Cornelia Huck
2017-02-23 12:20 ` [Qemu-devel] [PATCH v2 5/5] pc-bios/s390-ccw.img: rebuild image Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0652d8e-399a-411f-b338-e80674ae27c4@redhat.com \
    --to=thuth@redhat.com \
    --cc=agraf@suse.de \
    --cc=alifm@linux.vnet.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.