From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aYDlp-0002V5-VP for mharc-grub-devel@gnu.org; Tue, 23 Feb 2016 09:16:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYDlk-0002Ty-IE for grub-devel@gnu.org; Tue, 23 Feb 2016 09:16:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYDlg-0007yA-Fh for grub-devel@gnu.org; Tue, 23 Feb 2016 09:16:52 -0500 Received: from mail-ob0-x235.google.com ([2607:f8b0:4003:c01::235]:33444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYDlg-0007y3-83 for grub-devel@gnu.org; Tue, 23 Feb 2016 09:16:48 -0500 Received: by mail-ob0-x235.google.com with SMTP id jq7so196463525obb.0 for ; Tue, 23 Feb 2016 06:16:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/GfmUo3YMsMjb80ZpVgoATDVnPMyJqLzLcUNWSXtssU=; b=SHGVTESDFsLSkJkDq/7khCskt8mlEc7JfRFCsIwD7ho8r0v0IGGXpc64kZFAiUSxvF IIj5706563EHZA5DHaH9FLvvJaSg2DUHKqZG6U+fIQJi2n3TtDE2EH7jsDuaih5t/r+5 5Cxu5xg9fO/EEPOtr104+Wx4xECVICZFRFrVs= 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:date :message-id:subject:from:to:cc:content-type; bh=/GfmUo3YMsMjb80ZpVgoATDVnPMyJqLzLcUNWSXtssU=; b=f2ye0Lq0zg+eCIHE1vd0pApwCjrucAGrlALy0S65CFO1M4pxe+UoOhWVWQXAQZ/hTi G7lpKTdHmKRN5iTlMv+ibAWt615KhNEVLu2++0fanVY5Ic5FugT4/9wn6Y4LDpygyqp2 EDdPwrGhE776kK6P3FNhYDrKGKJ/zCBoM1kauuO4BzUWRQKc5OuaYfv0yRgwOLKtkRn1 +0VUgGmRoVRRlEMVi3XSIBd7Bh2bvWZt2p283wZ8GaJp5/Y3tyDaSnQSXgEQ8RSpxjQa n07SzGh/vhh2epbQeHxa536mk+yZbOHbCIZtYIxU9TR1kyhvJHTEEDix27VV7nrUMVZf W/Yw== X-Gm-Message-State: AG10YOSBFb+x3fDLainPCc6Guf2HBALdz4n9lKcZjbLMhzzfQsmaa9kXWv4QGWX/HWSplfgI42MbFFxbZWXaQ/Ay MIME-Version: 1.0 X-Received: by 10.182.137.198 with SMTP id qk6mr27281043obb.5.1456237007429; Tue, 23 Feb 2016 06:16:47 -0800 (PST) Received: by 10.202.71.3 with HTTP; Tue, 23 Feb 2016 06:16:47 -0800 (PST) In-Reply-To: <1456221631.6225.119.camel@citrix.com> References: <1455899332-9054-1-git-send-email-julien.grall@linaro.org> <1456221631.6225.119.camel@citrix.com> Date: Tue, 23 Feb 2016 22:16:47 +0800 Message-ID: Subject: Re: [PATCH] arm64: xen_boot: Fix xen boot using Grub on AARCH64 From: Fu Wei To: Ian Campbell 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:4003:c01::235 Cc: The development of GNU GRUB , Steve Capper , Vladimir Serbinenko , Julien Grall , xen-devel , stefano.stabellini@citrix.com X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2016 14:16:56 -0000 Hi Ian On 23 February 2016 at 18:00, Ian Campbell wrote: > On Mon, 2016-02-22 at 17:29 +0800, 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 >> >> 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" > > I must confess when Vlad proposed this change I thought Xen was able to > automatically probe for whether a module was an XSM module. Perhaps it is > either broken or that functionality never existed to start with? > >From the test result, it seems that the latest xen can NOT automatically probe XSM module, even we load xsm as the third module. the test branch is master branch. Please correct me if I tested it in wrong way. > Ian. -- 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