All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Laurent Vivier <lvivier@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>,
	Andrew Jones <drjones@redhat.com>"Richard W.M. Jones"
	<rjones@redhat.com>, Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH RFC] spapr: by-pass SLOF when -kernel is provided
Date: Tue, 5 Jul 2016 20:44:26 +0200	[thread overview]
Message-ID: <20160705204426.38e49938@bahia.lan> (raw)
In-Reply-To: <1467729757-12441-1-git-send-email-lvivier@redhat.com>

On Tue,  5 Jul 2016 16:42:37 +0200
Laurent Vivier <lvivier@redhat.com> wrote:

> As device-tree is now fully built by QEMU, we don't need SLOF
> anymore if the kernel is provided on the command line.
> 
> In this case, don't load SLOF and boot directly into the
> kernel.
> 
> This saves at least 5 seconds on the boot sequence.
> 

The concept looks great so I gave a try with a fedora24 guest.

I copied the kernel and initramfs to the host and passed the kernel arguments
taken from grub.

The kernel starts but the boot sequence stalls at:

[  OK  ] Reached target Basic System.
[  126.238400] dracut-initqueue[290]: Warning: dracut-initqueue timeout - starting timeout scripts

I also noticed this error:

[    0.127303] WARNING: nvram corruption detected: 0-length partition
[    0.127610] nvram: No room to create ibm,rtas-log partition, deleting any obsolete OS partitions...
[    0.128011] nvram: Failed to find or create ibm,rtas-log partition, err -28
[    0.128300] nvram: No room to create lnx,oops-log partition, deleting any obsolete OS partitions...
[    0.128701] nvram: Failed to find or create lnx,oops-log partition, err -28
Linux ppc6400] nvram: Failed to initialize oops partition!

Cc'ing Nikunj who has already worked on booting a guest without SLOF.


> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  hw/ppc/spapr.c | 37 ++++++++++++++++++++-----------------
>  1 file changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 7f33a1b..bbdb21d 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -1219,8 +1219,11 @@ static void ppc_spapr_reset(void)
>      first_ppc_cpu->env.gpr[3] = spapr->fdt_addr;
>      first_ppc_cpu->env.gpr[5] = 0;
>      first_cpu->halted = 0;
> -    first_ppc_cpu->env.nip = SPAPR_ENTRY_POINT;
> -
> +    if (machine->kernel_filename) {
> +        first_ppc_cpu->env.nip = KERNEL_LOAD_ADDR;
> +    } else {
> +        first_ppc_cpu->env.nip = SPAPR_ENTRY_POINT;
> +    }
>  }
>  
>  static void spapr_create_nvram(sPAPRMachineState *spapr)
> @@ -2023,23 +2026,23 @@ static void ppc_spapr_init(MachineState *machine)
>              initrd_base = 0;
>              initrd_size = 0;
>          }
> +    } else {
> +        if (bios_name == NULL) {
> +            bios_name = FW_FILE_NAME;
> +        }
> +        filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
> +        if (!filename) {
> +            error_report("Could not find LPAR firmware '%s'", bios_name);
> +            exit(1);
> +        }
> +        fw_size = load_image_targphys(filename, 0, FW_MAX_SIZE);
> +        if (fw_size <= 0) {
> +            error_report("Could not load LPAR firmware '%s'", filename);
> +            exit(1);
> +        }
> +        g_free(filename);
>      }
>  
> -    if (bios_name == NULL) {
> -        bios_name = FW_FILE_NAME;
> -    }
> -    filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
> -    if (!filename) {
> -        error_report("Could not find LPAR firmware '%s'", bios_name);
> -        exit(1);
> -    }
> -    fw_size = load_image_targphys(filename, 0, FW_MAX_SIZE);
> -    if (fw_size <= 0) {
> -        error_report("Could not load LPAR firmware '%s'", filename);
> -        exit(1);
> -    }
> -    g_free(filename);
> -
>      /* FIXME: Should register things through the MachineState's qdev
>       * interface, this is a legacy from the sPAPREnvironment structure
>       * which predated MachineState but had a similar function */

  parent reply	other threads:[~2016-07-05 18:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 14:42 [Qemu-devel] [PATCH RFC] spapr: by-pass SLOF when -kernel is provided Laurent Vivier
2016-07-05 17:58 ` [Qemu-devel] [Qemu-ppc] " Cédric Le Goater
2016-07-05 18:44 ` Greg Kurz [this message]
2016-07-05 18:51   ` Laurent Vivier
2016-07-06  7:03     ` Greg Kurz
2016-07-06  8:37       ` Laurent Vivier
2016-07-06  1:35 ` [Qemu-devel] " David Gibson
2016-07-06  3:33   ` Alexey Kardashevskiy
2016-07-06  7:04     ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-07-06  8:02     ` Nikunj A Dadhania
2016-07-06  8:04       ` Alexey Kardashevskiy

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=20160705204426.38e49938@bahia.lan \
    --to=groug@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=drjones@redhat.com \
    --cc=lvivier@redhat.com \
    /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.