From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fu Wei Subject: Re: [PATCH] arm64: xen_boot: Fix xen boot using Grub on AARCH64 Date: Mon, 22 Feb 2016 17:29:18 +0800 Message-ID: References: <1455899332-9054-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1455899332-9054-1-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: The development of GNU GRUB , Ian Campbell , Steve Capper , Vladimir Serbinenko , xen-devel , stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org Hi Julien, On 20 February 2016 at 00:28, Julien Grall 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 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