From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aabWE-0004pE-3G for mharc-grub-devel@gnu.org; Mon, 29 Feb 2016 23:02:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aabWB-0004md-K5 for grub-devel@gnu.org; Mon, 29 Feb 2016 23:02:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aabW8-00046I-E7 for grub-devel@gnu.org; Mon, 29 Feb 2016 23:02:39 -0500 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:36699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aabW7-00045x-S8 for grub-devel@gnu.org; Mon, 29 Feb 2016 23:02:36 -0500 Received: by mail-lf0-x243.google.com with SMTP id h198so8045731lfh.3 for ; Mon, 29 Feb 2016 20:02:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=3TOtHHcKI8yRYC6Z+HLICTTlSNQCDuTLMWQW0c7blZs=; b=pxcAkY15JhXfUxbnWzphjL41P2FFeFqBjtPE+Lt8a99YfSE7qyFdydlsXFaXDggLRh utwzFzgaxb28vUVzPxQP8jA5fZ0sJbi8k59ImrC+kD5SUfr3qG2qysz2mXnh/XmtTJcW 3g3rtXhHNn9iJ8Ninp/wq1w3BG5A8g/Nt66GYXroa+n4dwodRK82SwEkN5kgXfV2d9Bm uxo7eyhUwsPQeDBBcUrAJrTTa8GD+CeATz3dgobDNprq2uMuBfl5ZVDFrR9nBUUHWFsU SMqcMAr8TNk9fyYJwC0+hGyW1up481QUO+oPZQi4RdFNIWUK410qTA0UDJ5HqpJd1U39 p5hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=3TOtHHcKI8yRYC6Z+HLICTTlSNQCDuTLMWQW0c7blZs=; b=Yz3b78W/T5WZvF87gcjZS3T+5uqdgL43r6Kewu3sH0TlBk0fP7z6wQ6YC5cEuwMhgp 11OhTozubpGQh9Y0ek3/l8wCcDne5EmEMfT3J23LYZa4uN168utPfW9Zj7B9yz7Opslp c9N1jLaLlF/zRux11W8T5mvihCQtuaEArDpeqKEoRRRwSxXoVJ3n8e/8QEYWA9t2y+oO CZCbeI1NJAtxD1QMl3wD4HWGfZU0TupTjncT8BBocBKErKAhHvOUTMKZ5L9mtPGUNG3B 34O/J/c813VTcsMLvi3kAiQE7VQWaZzXU+yj3EjxxD4ljv4IbNpilMuFCwKIvUlO712n B3bg== X-Gm-Message-State: AD7BkJJ+DCqRH9JcIGebzzeRoQnq+yadlvfI593k4G/jeC6uR38Tl0NfcNBgmRRvC1YCFw== X-Received: by 10.25.166.130 with SMTP id p124mr7259127lfe.120.1456804954526; Mon, 29 Feb 2016 20:02:34 -0800 (PST) Received: from [192.168.1.41] (ppp109-252-76-159.pppoe.spdop.ru. [109.252.76.159]) by smtp.gmail.com with ESMTPSA id t12sm4480089lfe.46.2016.02.29.20.02.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Feb 2016 20:02:33 -0800 (PST) Subject: Re: [PATCH v2 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi To: Konrad Rzeszutek Wilk References: <1456382355-24614-2-git-send-email-fu.wei@linaro.org> <1456382355-24614-5-git-send-email-fu.wei@linaro.org> <56CF3B24.6030605@gmail.com> <20160227203341.GM31035@char.us.oracle.com> <56D28149.30907@gmail.com> <20160229144114.GC16364@char.us.oracle.com> From: Andrei Borzenkov X-Enigmail-Draft-Status: N1110 Message-ID: <56D51458.3090006@gmail.com> Date: Tue, 1 Mar 2016 07:02:32 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160229144114.GC16364@char.us.oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::243 Cc: The development of GNU GRUB , "xen-devel@lists.xensource.com" , Ian Campbell , Vladimir Serbinenko , Julien Grall , Leif Lindholm , Linaro UEFI Mailman List , Jon Masters 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, 01 Mar 2016 04:02:40 -0000 29.02.2016 17:41, Konrad Rzeszutek Wilk пишет: > On Sun, Feb 28, 2016 at 08:10:33AM +0300, Andrei Borzenkov wrote: >> 27.02.2016 23:33, Konrad Rzeszutek Wilk пишет: >>> On Fri, Feb 26, 2016 at 07:15:52PM +0800, Fu Wei wrote: >>>> Hi Andrei, >>>> >>>> On 26 February 2016 at 18:50, Andrei Borzenkov wrote: >>>>> On Fri, Feb 26, 2016 at 8:59 AM, Fu Wei wrote: >>>>>>>>>> +@subsection xen_module >>>>>>>>>> >>>>>>>>>> -@deffn Command xen_linux file [arguments] >>>>>>>>>> -Load a dom0 kernel image for xen hypervisor at the booting process of xen. >>>>>>>>>> +@deffn Command xen_module [--nounzip] file [arguments] >>>>>>>>>> +Load a module for xen hypervisor at the booting process of xen. >>>>>>>>>> The rest of the line is passed verbatim as the module command line. >>>>>>>>>> +Each module will be identified by the order in which the modules are added. >>>>>>>>>> +The 1st module: dom0 kernel image >>>>>>>>>> +The 2nd module: dom0 ramdisk >>>>>>>>>> +All subsequent modules: UNKNOW >>>>>>>>>> @end deffn >>>>>>>>> >>>>>>>>> Hmm ... from previous discussion I gathered that Xen can detect module >>>>>>>>> type. What if there is no initrd for dom0? How can subsequent modules be >>>>>>>> >>>>>>>> Now , Xen detect module type by the order. (at least on ARM64). >>>>>>>> I think i386 is using Multiboot(2) protocol, so maybe this order is >>>>>>>> nothing to do with i386. >>>>>>>> >>>>>>> >>>>>>> Then we have obvious problem with your XSM patch (http://savannah.gnu.org/bugs/?43420) - XSM may land as the first module. That's actually something to solve on Xen side I think. It's just that so far we had just kernel and initrd, so that was non issue. >>>>>> >>>>>> Oh, did you mean Wei Liu's patch? >>>>>> >>>>>> I guess XSM may land as the third module (or the module after linux >>>>>> kernel, if you don't have initrd) >>>>>> >>>>>> Yes, agree. (That's actually something to solve on Xen side) >>>>>> >>>>>> I guess xen can get xsm from a special initrd. so for now there is not >>>>>> big problem on xsm. >>>>>> >>>>>> Please correct me if I misunderstand something. :-) >>>>>> >>>>>> Thanks! >>>>>> >>>>>> Back to this patch, is that OK for you, or any suggestion? Thanks ! >>>>>> >>>>> >>>>> Yes, as this is dedicated Xen loader we should document this mandatory >>>>> order - first module must be kernel image, second module must be >>>>> initrd. I do not think we need to mention possibility to load more >>>>> than two modules until there is clear understanding how it can be done >>>>> without initrd. >>>> >>>> Great thanks for your review, I have updated and sent the v3 patchset, >>>> Hope I understood your suggestion correctly, Please check. :-) >>> >>> What if the initrd is catted to the kernel image (which you can >>> do on x86)? And then the 1st module is your XSM? >>> >> >> On x86 Xen can detect microcode and xsm modules; the first unknown > > 'can'. If you use 'ucode=scan' on the Xen command line. Otherwise it has > no clue. > You can also pass ucode=N where N is module number ... but it goes off-topic. The current state is - it turned out that on ARM Xen is capable to "detect" only two types of modules - dom0 kernel and dom0 initrd. The fact is that Xen on ARM has at least one more module type and it is not possible to reliably load it with current interface. > It actually would be just much nicer if Multiboot2 had some tag describing > this and Xen (or any other OS) could just parse it like that. But that is > just hand-waving, nice-to-do. > It was decided that multiboot2 will not be used, and initial interface did pass module types from GRUB to Xen via FDT, but then it was changed to generic xen_module with explicit type specification. Personally I think that leaving detection of how to use module should be left to loaded program, and that modules should include enough information so that this can be done. > >> module after that is assumed to be initrd (dom0 kernel always must be >> the very first module provided). > > That is true. >> >> On arm there is no detection - module type is taken from FDT; if no >> module type is provided, the first unknown module is assumed to be >> kernel, the second - initrd. >> >> See also http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00333.html >> >>> Is this .. order dependency written somewhere in a document? In the >>> Xen code-base that is? >>> >>