All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fu Wei <fu.wei@linaro.org>
To: Julien Grall <julien.grall@linaro.org>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Steve Capper <steve.capper@arm.com>,
	Vladimir Serbinenko <phcoder@gmail.com>,
	xen-devel <xen-devel@lists.xen.org>,
	stefano.stabellini@citrix.com
Subject: Re: [PATCH] arm64: xen_boot: Fix xen boot using Grub on AARCH64
Date: Mon, 22 Feb 2016 17:29:18 +0800	[thread overview]
Message-ID: <CADyBb7s=c9VYdgMpEVDhoF7FP8cOX-K+DOSpGXiUUWLaPY-3ng@mail.gmail.com> (raw)
In-Reply-To: <1455899332-9054-1-git-send-email-julien.grall@linaro.org>

Hi Julien,

On 20 February 2016 at 00:28, Julien Grall <julien.grall@linaro.org> wrote:
> Xen is currently crashing because of malformed compatible property for
> the boot module. This is because the property string is not
> null-terminated as requested by the ePAR spec.
> ---
>  grub-core/loader/arm64/xen_boot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
> index a914eb8..8ae43d7 100644
> --- a/grub-core/loader/arm64/xen_boot.c
> +++ b/grub-core/loader/arm64/xen_boot.c
> @@ -156,7 +156,7 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt)
>        grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name);
>
>    retval = grub_fdt_set_prop (xen_boot_fdt, module_node, "compatible",
> -                             MODULE_CUSTOM_COMPATIBLE, sizeof(MODULE_CUSTOM_COMPATIBLE) - 1);
> +                             MODULE_CUSTOM_COMPATIBLE, sizeof(MODULE_CUSTOM_COMPATIBLE));
>    if (retval)
>      return grub_error (GRUB_ERR_IO, "failed to update FDT");
>
> --
> 1.9.1

I have tested it. yes, xen will crash without this patch.
Tested-by: Fu Wei <fu.wei@linaro.org>

BTW, since Vladimir has simplified the xen boot code , and Now Xen
distinguishes modules by order.
------
menuentry 'Foundation Model Xen test with initramfs' {
    xen_hypervisor /xen -- no-bootscrub console=dtuart conswitch=x
dtuart=serial0 dom0_mem=512M dom0_max_vcpus=2
    xen_module /dom0_kernel_Image console=hvc0 root=/dev/ram0 ro
    xen_module /dom0_initramfs.cpio
    xen_module /xsm
    devicetree /fvp-base-gicv2-psci.dtb
}
-----

Maybe we should update doc to  coordinate with this change.

And another problem is: How does XEN identify XSM?
Test with the config file above, I got "(XEN) MODULE[3]:
00000008fabb4000 - 00000008fabb65e7 Unknown"

Please correct me if I miss something.


>



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15,
One Corporate Avenue,222 Hubin Road,Huangpu District,
Shanghai,China 200021


  reply	other threads:[~2016-02-22  9:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 16:28 [PATCH] arm64: xen_boot: Fix xen boot using Grub on AARCH64 Julien Grall
2016-02-22  9:29 ` Fu Wei [this message]
2016-02-23 10:00   ` Ian Campbell
2016-02-23 14:16     ` Fu Wei
2016-02-27 17:05       ` Andrei Borzenkov
2016-02-27 17:05       ` Andrei Borzenkov
2016-02-23 14:16     ` Fu Wei
2016-02-23 10:00   ` Ian Campbell
2016-07-26  8:40   ` Fu Wei
2016-07-26  8:40   ` Fu Wei
2016-02-22  9:29 ` Fu Wei
2016-03-30 15:52 ` Julien Grall
2016-03-30 17:10   ` Fu Wei
2016-03-30 17:10   ` Fu Wei
2016-03-30 15:52 ` Julien Grall
2016-11-03 14:19 ` Daniel Kiper
2016-11-03 14:19 ` Daniel Kiper
2016-02-19 16:28 Julien Grall

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='CADyBb7s=c9VYdgMpEVDhoF7FP8cOX-K+DOSpGXiUUWLaPY-3ng@mail.gmail.com' \
    --to=fu.wei@linaro.org \
    --cc=grub-devel@gnu.org \
    --cc=ian.campbell@citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=phcoder@gmail.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=steve.capper@arm.com \
    --cc=xen-devel@lists.xen.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.