From: Alexander Graf <agraf@suse.de>
To: Dinar Valeev <dvaleev@suse.de>, Markus Armbruster <armbru@redhat.com>
Cc: Dinar Valeev <dvaleev@suse.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] hw/ppc/spapr.c Set default boot order
Date: Mon, 26 Jan 2015 10:33:56 +0100 [thread overview]
Message-ID: <54C60A04.1020404@suse.de> (raw)
In-Reply-To: <54C639A7.1000305@suse.de>
On 01/26/2015 01:57 PM, Dinar Valeev wrote:
> On 01/26/2015 01:37 PM, Markus Armbruster wrote:
>> Dinar Valeev <dvaleev@suse.de> writes:
>>
>>> On 01/26/2015 10:11 AM, Markus Armbruster wrote:
>>>> dvaleev@suse.de writes:
>>>>
>>>>> From: Dinar Valeev <dvaleev@suse.com>
>>>>>
>>>>> In order to use -boot once=X option we need to have default list
>>>>> where restore to on reset.
>>>>
>>>> Really? What happens without this patch?
>>>>
>>> qemu segfaults on reset.
>>> 0 > reset-all Segmentation fault
>>
>> Next time, include a backtrace, please.
> Ok, sorry for that.
>>
>> Here's what I think happens.
>>
>> Boot order comes from --boot parameter once, order, or else the machine
>> type's .default_boot_order. The latter is null for you.
>>
>> It gets passed via ppc_spapr_init() to spapr_create_fdt_skel(), which
>> sets qemu,boot-device in the FDT to it, but only when it isn't null.
>>
>> If it comes from parameter once, we additionally register a reset
>> handler to switch it to parameter order or else .default_boot_order on
>> reset. If you specify once, but not order, this is null for you.
>>
>> On reset, reset handler restore_boot_order() runs. Unlike
>> spapr_create_fdt_skel(), it doesn't check for null, and crashes in
>> validate_bootdevices().
>>
>> Correct?
> Yes
>
> qemu_register_boot_set is implemented in PATCH 2/2. on reset
> boot_device is restored to NULL
>>
>> For me, a null .default_boot_order means "machine type does not support
>> boot order" (this is how commit c165473 treats it). Arguably, --boot
>> order and once should be rejected then.
> AFICS SLOF handles qemu,boot-device as boot device, if nothing passed
> then it goes disk, cdrom, network. Which is the same as "cdn" list.
That's not entirely true. If SLOF doesn't see qemu,boot-device, it first
goes via its NVRAM configured boot list and only if nothing is there it
falls back to "cdn".
Maybe the actual appropriate thing would be "mcdn" with m meaning "NVRAM".
Alex
>
>> If I understand you correctly, your machine type does support boot
>> order. Giving it a non-null .default_boot_order makes sense then. The
>> appropriate value depends on firmware. It could even be "".
>>
>> The null check in spapr_create_fdt_skel() looks superfluous then.
>> Consider dropping it.
>>
>> Makes sense?
>>
>
prev parent reply other threads:[~2015-01-26 15:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 22:51 [Qemu-devel] [PATCH 1/2] hw/ppc/spapr.c Set default boot order dvaleev
2015-01-23 22:51 ` [Qemu-devel] [PATCH 2/2] hw/ppc/spapr Add qemu_register_boot_set for SPAPR dvaleev
2015-01-23 23:04 ` Alexander Graf
2015-01-24 16:11 ` Dinar Valeev
2015-01-26 10:49 ` Dinar Valeev
2015-01-26 9:35 ` Alexander Graf
2015-01-29 0:40 ` Gonglei
2015-01-29 0:42 ` Alexander Graf
2015-01-29 3:46 ` Gonglei
2015-01-29 12:55 ` Alexander Graf
2015-01-29 13:00 ` Gonglei
2015-04-02 7:41 ` Alexey Kardashevskiy
2015-04-02 11:23 ` Gonglei
2015-01-23 23:00 ` [Qemu-devel] [PATCH 1/2] hw/ppc/spapr.c Set default boot order Alexander Graf
2015-01-27 4:36 ` Nikunj A Dadhania
2015-01-26 9:11 ` Markus Armbruster
2015-01-26 10:32 ` Dinar Valeev
2015-01-26 12:37 ` Markus Armbruster
2015-01-26 12:57 ` Dinar Valeev
2015-01-26 9:33 ` Alexander Graf [this message]
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=54C60A04.1020404@suse.de \
--to=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=dvaleev@suse.com \
--cc=dvaleev@suse.de \
--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.