From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bRxv3-0004oR-6n for mharc-grub-devel@gnu.org; Tue, 26 Jul 2016 04:40:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRxv0-0004lw-QC for grub-devel@gnu.org; Tue, 26 Jul 2016 04:40:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRxuy-0007aE-SC for grub-devel@gnu.org; Tue, 26 Jul 2016 04:40:49 -0400 Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:35584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRxuy-0007a3-DQ for grub-devel@gnu.org; Tue, 26 Jul 2016 04:40:48 -0400 Received: by mail-io0-x22b.google.com with SMTP id m101so6476198ioi.2 for ; Tue, 26 Jul 2016 01:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+3JCtNhHqmaKlk2oHrKr3c8nW073HNArRU+ZlMtAiC4=; b=iyftI7SdRUH0Bewpxi2pdEeUXdmyUTxM8G66h8WP+Q+Q7oLbq5PJ3d8bRTG83x6RaP O5pGzUIv4aPlHsJsHnuex+tmmhPK87mR/IAGyZUBmwcni8WDvGtzzTZ3Nm6qCgSnyALI dZODqq1KT7nLWZIzAwOIteFWH0dQ0Xjujh/Os= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+3JCtNhHqmaKlk2oHrKr3c8nW073HNArRU+ZlMtAiC4=; b=eBgqTisK/IK3k0AgsngdoALKfDDIUqrjGeaB03GviMGNlmGtM4BWu331awi+7z4c6V pqMDMNdmhgMf7QxOOiDDsNlkG0IExz52gpzRBdhn8yY5DlMtnDgvYS79MpbF1AysAKCI +wr0sGEOuBW9mzAu3h0deZ2OJgUXy2IaqbprpUu0T24DJvlHJVSv1IwDaxcP+uo7H9qN 3OLj9Jq+MvSSdBb/mC93Rdwjjm4JX/PW6s/QklH6f1Q+j8Cce00Oo5LB5TwMPXD4hGGQ 4ijYDt2wmhIc0QLCRNXIdYFaPOKo/MuP11uyN4gngA01OG19IHdxLklk1nCj8vWgc2uj yWsA== X-Gm-Message-State: AEkoouvVr79v0KX2E5j4AJXdTPBFXr3AiRlSWmsZFXhDMS8PbknQRBm2cDSL/N3GQtJjqhQA/kS8W0JwD/+riRDF X-Received: by 10.157.27.242 with SMTP id v47mr10949409otv.4.1469522447794; Tue, 26 Jul 2016 01:40:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.212.22 with HTTP; Tue, 26 Jul 2016 01:40:47 -0700 (PDT) In-Reply-To: References: <1455899332-9054-1-git-send-email-julien.grall@linaro.org> From: Fu Wei Date: Tue, 26 Jul 2016 16:40:47 +0800 Message-ID: Subject: Re: [PATCH] arm64: xen_boot: Fix xen boot using Grub on AARCH64 To: Julien Grall Cc: The development of GNU GRUB , xen-devel , Vladimir Serbinenko , Ian Campbell , stefano.stabellini@citrix.com, Steve Capper Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c06::22b X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 08:40:52 -0000 Hi all On 22 February 2016 at 17:29, Fu Wei wrote: > 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 I guess this bugfix haven't been merged yet, Hope this fix can be merged soon :-) > > 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 -- Best regards, Fu Wei Software Engineer Red Hat