[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] How to boot domU and dom0 from a device tree


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Denis Obrezkov <denisobrezkov@xxxxxxxxx>
  • Date: Wed, 12 Jun 2019 09:36:37 +0200
  • Autocrypt: addr=denisobrezkov@xxxxxxxxx; prefer-encrypt=mutual; keydata= mQMuBFrAxPQRCAD59CJNd5LF1VmojUBpdr/bJ2TaKC7SW4ln7+PWn+QyAJfFOVFlTRIDsAlP 65y7CacXFCXmLTACo4a7HEhRb5787kPm6rc30zpL+04uXCeTruYZi0ZnQVXOiab/qy3aMsk0 6n9hMY28TSbM9nynnlrbg9pGkb1EiFVNsowJjFSKXa3Rpogte9qxfXmLf2eV0MZNnrmq6Kb2 8ri5/Ffh5DG1CsN/dkv8n1kw2QqMM2RT+ZS57D+yCehtw355EXSVh2r+GsXAqMinOexcdYI4 skvvP84OovRMnlJhmRdnbjO+QFiOVeLUj7WHMT3AbClaBlUuHkbFi9HLBHAiu6uMrNtzAQD9 KoM6SXbuvlhCq2v78dGkex9EgaA7CSnBcNXuUdrjYQf+MsZgI7oDihT6TUBO0IDQL+qSrozs /hHV+HhWtc5+SYTsHXxnTkcVe12vR0uPw3fFUuncWnMRzHivKZC2ZF/w3LJL/nGzguAoPa9e VghM38EP49yO6ESthD4WvELMy2+zPkMiUqilMfxOl370RXxEBUIzFSpP6oqvNq7fvThGTQah mrFhflGSyMHXk75VkCiY+cbrMeB9xG7H3nlbQ9fYVCOPejnt8gImeazdIghQh1tjbNpjQhy8 50klCowN5H+gaSZsy4K7jlJ1UNFz/vWCvlr3W8o4tA6EoJ4tjJV2HXcrUBPYLwkruKnv8QJM vyVj5an6Sfuwt/AmFEOKo1QJnAf+Oi47RrOmec8lXS/06TMn7z6krmuRul03HXayCtREqMyY VCf87oMpPYYnFJolDrSB8kCSZRn2aixzHl4IIGa9RVuywChzUvgZJbFGPFR+Qz1BK9Ltl7FC rQc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qaXdXj3iaX6wwJ 2Oo3cSxMGdY/8grRTDGYjItpWEM2noIRzdWSybzavtLHu/LmG4rbgy2aNm/TiVp28G5KvWW/ fCLomZhN0JscRgSkYjSaxmMgEdks1h9DWTHkiH4EGBEIACYWIQTG5lj1j5VIuKBD/kz7iQsT JJ7s+QUCWsDE9AIbDAUJBaOagAAKCRD7iQsTJJ7s+UF2AQDqHEO2tekVMTWJa3SakIM5FJjk sao+JkzbKe0vDy4ecwEAukGaHvmKxMZsUOOjDWjDe4eV+aRTVjUjY7LAl3OJkiU=
  • Cc: Iain Hunter <drhunter95@xxxxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Hunyue Yau <hy-gsoc@xxxxxxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 12 Jun 2019 07:37:54 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>
  • Openpgp: preference=signencrypt

Hi,

On 6/12/19 12:18 AM, Stefano Stabellini wrote:
> I managed to reproduced the issue, and I know how to get past it.  Try
> using the raw kernel Image (arch/arm64/boot/Image) instead of Image.gz
> for dom0 and domU. That fixed it for me.

yes, it works. I need only to configure consoles right.
> 
> Julien, I didn't manage to figure out what the issue is exactly, but it
> looks like Image.gz loading is broken at the moment.
> 
> 
> Denis, BTW do you think the following example is useful to understand
> how dom0less works?
> https://marc.info/?l=xen-devel&m=155675350818872
I have seen this question earlier. I think it is useful to some extent.
Because, since I am a novice in in xen, it is hard to understand what
dom0less is. Should there be a configuration for dom0, should dom0
present? But I think that overall this piece of documentation is useful.
> 
> 
> On Tue, 11 Jun 2019, Denis Obrezkov wrote:
>> It seems I can't attach big files in xen mailing list, here the images are:
>> https://drive.google.com/file/d/1yhVQhqa0HQr8tOYIpr9FXPXPw-65vibN/view?usp=sharing
>>
>> On 6/11/19 8:20 PM, Denis Obrezkov wrote:
>>> Ok,
>>> Linux 4.20.11
>>> xen 4.12.0
>>>
>>> Their configs are default (defconfig for Linux).
>>>
>>> maybe I should use a newer kernel.
>>> I will try it soon.
>>>
>>> On 6/11/19 6:09 PM, Stefano Stabellini wrote:
>>>> Hi Denis,
>>>>
>>>> I cannot spot anything wrong looking at the device tree configuration.
>>>> Could you please provide:
>>>>
>>>> - the original device tree
>>>> - all the binaries, including Xen, Linux, ramdisks
>>>> - the exact version of Xen and Linux you used
>>>> - the Xen and Linux kconfig (xen/.config for Xen and .config for Linux)
>>>> - the QEMU command line (if you are using QEMU)
>>>>
>>>> I'll try to repro the issue here.
>>>>
>>>>
>>>> On Tue, 11 Jun 2019, Denis Obrezkov wrote:
>>>>> Hi,
>>>>>
>>>>> I don't think it's the memory issue:
>>>>>
>>>>> (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
>>>>> (XEN) *** LOADING DOMU cpus=1 memory=a00000KB ***
>>>>> (XEN) Loading Domd1 kernel from boot module @ 0000000043000000
>>>>> (XEN) Loading ramdisk from boot module @ 0000000048000000
>>>>> (XEN)
>>>>> (XEN) ****************************************
>>>>> (XEN) Panic on CPU 0:
>>>>> (XEN) Out of memory
>>>>> (XEN) ****************************************
>>>>> (XEN)
>>>>> (XEN) Reboot in five seconds...
>>>>>
>>>>> On 6/11/19 2:57 PM, Julien Grall wrote:
>>>>>> On 10/06/2019 22:24, Denis Obrezkov wrote:
>>>>>>
>>>>>> Hi Denis,
>>>>>>
>>>>>>> On 6/10/19 10:30 PM, Stefano Stabellini wrote:
>>>>>>>> On Mon, 10 Jun 2019, Denis Obrezkov wrote:
>>>>>>>>> Also, I found out how to pass the amount of memory for dom0. And I
>>>>>>>>> passed 256M. And I can see that in a device tree there is a memory 
>>>>>>>>> node
>>>>>>>>> with 4096M allocated. So, I don't understand why I have this error:
>>>>>>>>
>>>>>>>> This is easy, the answer is below.
>>>>>>>>
>>>>>>>>
>>>>>>>>> (XEN) *** LOADING DOMAIN 0 ***
>>>>>>>>> (XEN) Loading Domd0 kernel from boot module @ 0000000047000000
>>>>>>>>> (XEN) Loading ramdisk from boot module @ 0000000042000000
>>>>>>>>> (XEN) Allocating 1:1 mappings totalling 256MB for dom0:
>>>>>>>>> (XEN) BANK[0] 0x00000050000000-0x00000060000000 (256MB)
>>>>>>>>> (XEN) Grant table range: 0x00000049000000-0x00000049040000
>>>>>>>>> (XEN) Allocating PPI 16 for event channel interrupt
>>>>>>>>> (XEN) Loading zImage from 0000000138000000 to
>>>>>>>>> 0000000050080000-00000000512d1a00
>>>>>>>>> (XEN) Loading dom0 initrd from 0000000042000000 to
>>>>>>>>> 0x0000000058200000-0x000000005831b680
>>>>>>>>> (XEN) Loading dom0 DTB to 0x0000000058000000-0x0000000058001da8
>>>>>>>>> (XEN) Initial low memory virq threshold set at 0x4000 pages.
>>>>>>>>> (XEN) Scrubbing Free RAM in background
>>>>>>>>> (XEN) Std. Loglevel: Errors and warnings
>>>>>>>>> (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
>>>>>>>>> (XEN) ***************************************************
>>>>>>>>> (XEN) No support for ARM_SMCCC_ARCH_WORKAROUND_1.
>>>>>>>>> (XEN) Please update your firmware.
>>>>>>>>> (XEN) ***************************************************
>>>>>>>>> (XEN) 3... 2... 1...
>>>>>>>>> (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch
>>>>>>>>> input)
>>>>>>>>> (XEN) *** LOADING DOMU cpus=1 memory=140000KB ***
>>>>>>>>> (XEN) Loading Domd1 kernel from boot module @ 0000000043000000
>>>>>>>>> (XEN) Loading ramdisk from boot module @ 0000000048000000
>>>>>>>>> (XEN)
>>>>>>>>> (XEN) ****************************************
>>>>>>>>> (XEN) Panic on CPU 0:
>>>>>>>>> (XEN) Out of memory
>>>>>>>>> (XEN) ****************************************
>>>>>>>>> (XEN)
>>>>>>>>> (XEN) Reboot in five seconds...
>>>>>>>>>
>>>>>>>>> fdt commands passed via u-boot:
>>>>>>>>>
>>>>>>>>> setenv xen_bootargs 'dom0_mem=256M'
>>>>>>>>
>>>>>>>> You just need to give more memory to dom0. Use dom0_mem=1G or something
>>>>>>>> like that for a start.
>>>>>>> But as far as I understand domU doesn't have enough memory and
>>>>>>> fails.     I
>>>>>>> change dom0_mem to 1G but the problem still exists.
>>>>>>
>>>>>> You are right, the problem is from DomU not Dom0...
>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> fdt addr 0x44000000
>>>>>>>>> fdt resize
>>>>>>>>> fdt set /chosen \#address-cells <1>
>>>>>>>>> fdt set /chosen \#size-cells <1>
>>>>>>>>> fdt set /chosen xen,xen-bootargs \"$xen_bootargs\"
>>>>>>>>> fdt mknod /chosen module@0
>>>>>>>>> fdt set /chosen/module@0 compatible "xen,linux-zimage"
>>>>>>>>> "xen,multiboot-module"
>>>>>>>>> fdt set /chosen/module@0 reg <0x47000000 0x7cc561>
>>>>>>>>> fdt set /chosen/module@0 bootargs "rw root=/dev/ram rdinit=/sbin/init
>>>>>>>>> earlyprintk=serial,ttyAMA0 console=hvc0 earlycon=xenboot"
>>>>>>>>> fdt mknod /chosen module@1
>>>>>>>>> fdt set /chosen/module@1 compatible "xen,linux-initrd"
>>>>>>>>> "xen,multiboot-module"
>>>>>>>>> fdt set /chosen/module@1 reg <0x42000000 0x11b680>
>>>>>>>>>
>>>>>>>>> fdt mknod /chosen domU1
>>>>>>>>> fdt set /chosen/domU1 compatible "xen,domain"
>>>>>>>>> fdt set /chosen/domU1 \#address-cells <1>
>>>>>>>>> fdt set /chosen/domU1 \#size-cells <1>
>>>>>>>>> fdt set /chosen/domU1 \cpus <1>
>>>>>>>>> fdt set /chosen/domU1 \memory <0 1310720>
>>>>>>
>>>>>> ... this property is used to tell how much memory the guest domU1 has. I
>>>>>> am a bit surprised that 136MB of RAM is not enough, but you could try to
>>>>>> bump it to 512MB or even 1GB and see.
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>
>>>>> -- 
>>>>> Regards, Denis Obrezkov
>>>>>
>>>
>>
>> -- 
>> Regards, Denis Obrezkov
>>

-- 
Regards, Denis Obrezkov

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.