Mailing List Archive

How to boot domU and dom0 from a device tree
Hello,

I  am trying to boot domU from a device tree. I want to use the same
ramdisk and kernel image as for dom0. These are my u-boot commands:

fdt addr 0x44000000
fdt resize
fdt set /chosen \#address-cells <1>
fdt set /chosen \#size-cells <1>
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 mknod /chosen/domU1 module@0
fdt set /chosen/domU1/module@0 compatible "xen,linux-zimage"
"xen,multiboot-module"
fdt set /chosen/domU1/module@0 reg <0x47000000 0x7cc561>
fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
rdinit=/sbin/init console=hvc0 earlycon=xenboot"

fdt mknod /chosen/domU1 module@1
fdt set /chosen/domU1/module@1 compatible "xen,linux-initrd"
"xen,multiboot-module"
fdt set /chosen/domU1/module@1 reg <0x42000000 0x11b680>

booti 0x49000000 - 0x44000000

I got: 

....

(XEN) *** LOADING DOMAIN 0 ***
(XEN) Missing kernel boot module?
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Could not set up DOM0 guest OS
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...

I wasn't able to find instructions on how to run domU and dom0 images
simultaneously.

--
Regards, Denis Obrezkov
Re: How to boot domU and dom0 from a device tree [ In reply to ]
I found out that I can get rid of that error if I load the same image to
another address space with -device loader. But then I get the error:
(XEN) ***************************************************
(XEN) PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW
(XEN) ***************************************************
(XEN) 3... 2... 1...
(XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
(XEN) *** LOADING DOMU cpus=1 memory=200000KB ***
(XEN) Loading Domd1 kernel from boot module @ 0000000043000000
(XEN) Loading ramdisk from boot module @ 0000000042000000
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Out of memory
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...

So, I don't understand how xen distribute the allocated memory and how
can it be allocated via a device tree.

On 6/10/19 12:09 PM, Denis Obrezkov wrote:
> Hello,
>
> I  am trying to boot domU from a device tree. I want to use the same
> ramdisk and kernel image as for dom0. These are my u-boot commands:
>
> fdt addr 0x44000000
> fdt resize
> fdt set /chosen \#address-cells <1>
> fdt set /chosen \#size-cells <1>
> 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 mknod /chosen/domU1 module@0
> fdt set /chosen/domU1/module@0 compatible "xen,linux-zimage"
> "xen,multiboot-module"
> fdt set /chosen/domU1/module@0 reg <0x47000000 0x7cc561>
> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
> rdinit=/sbin/init console=hvc0 earlycon=xenboot"
>
> fdt mknod /chosen/domU1 module@1
> fdt set /chosen/domU1/module@1 compatible "xen,linux-initrd"
> "xen,multiboot-module"
> fdt set /chosen/domU1/module@1 reg <0x42000000 0x11b680>
>
> booti 0x49000000 - 0x44000000
>
> I got: 
>
> ....
>
> (XEN) *** LOADING DOMAIN 0 ***
> (XEN) Missing kernel boot module?
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) Could not set up DOM0 guest OS
> (XEN) ****************************************
> (XEN)
> (XEN) Reboot in five seconds...
>
> I wasn't able to find instructions on how to run domU and dom0 images
> simultaneously.
>

--
Regards, Denis Obrezkov
Re: How to boot domU and dom0 from a device tree [ In reply to ]
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:
(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'

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>

fdt mknod /chosen/domU1 module@0
fdt set /chosen/domU1/module@0 compatible "multiboot,kernel"
"multiboot,module"
fdt set /chosen/domU1/module@0 reg <0x43000000 0x7cc561>
fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
rdinit=/sbin/init console=hvc0 earlycon=xenboot"

fdt mknod /chosen/domU1 module@1
fdt set /chosen/domU1/module@1 compatible "multiboot,ramdisk"
"multiboot,module"
fdt set /chosen/domU1/module@1 reg <0x48000000 0x11b680>

booti 0x49000000 - 0x44000000

On 6/10/19 2:24 PM, Denis Obrezkov wrote:
> I found out that I can get rid of that error if I load the same image to
> another address space with -device loader. But then I get the error:
> (XEN) ***************************************************
> (XEN) PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW
> (XEN) ***************************************************
> (XEN) 3... 2... 1...
> (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
> (XEN) *** LOADING DOMU cpus=1 memory=200000KB ***
> (XEN) Loading Domd1 kernel from boot module @ 0000000043000000
> (XEN) Loading ramdisk from boot module @ 0000000042000000
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) Out of memory
> (XEN) ****************************************
> (XEN)
> (XEN) Reboot in five seconds...
>
> So, I don't understand how xen distribute the allocated memory and how
> can it be allocated via a device tree.
>
> On 6/10/19 12:09 PM, Denis Obrezkov wrote:
>> Hello,
>>
>> I  am trying to boot domU from a device tree. I want to use the same
>> ramdisk and kernel image as for dom0. These are my u-boot commands:
>>
>> fdt addr 0x44000000
>> fdt resize
>> fdt set /chosen \#address-cells <1>
>> fdt set /chosen \#size-cells <1>
>> 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 mknod /chosen/domU1 module@0
>> fdt set /chosen/domU1/module@0 compatible "xen,linux-zimage"
>> "xen,multiboot-module"
>> fdt set /chosen/domU1/module@0 reg <0x47000000 0x7cc561>
>> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
>> rdinit=/sbin/init console=hvc0 earlycon=xenboot"
>>
>> fdt mknod /chosen/domU1 module@1
>> fdt set /chosen/domU1/module@1 compatible "xen,linux-initrd"
>> "xen,multiboot-module"
>> fdt set /chosen/domU1/module@1 reg <0x42000000 0x11b680>
>>
>> booti 0x49000000 - 0x44000000
>>
>> I got: 
>>
>> ....
>>
>> (XEN) *** LOADING DOMAIN 0 ***
>> (XEN) Missing kernel boot module?
>> (XEN)
>> (XEN) ****************************************
>> (XEN) Panic on CPU 0:
>> (XEN) Could not set up DOM0 guest OS
>> (XEN) ****************************************
>> (XEN)
>> (XEN) Reboot in five seconds...
>>
>> I wasn't able to find instructions on how to run domU and dom0 images
>> simultaneously.
>>
>

--
Regards, Denis Obrezkov
Re: How to boot domU and dom0 from a device tree [ In reply to ]
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.


> 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>
>
> fdt mknod /chosen/domU1 module@0
> fdt set /chosen/domU1/module@0 compatible "multiboot,kernel"
> "multiboot,module"
> fdt set /chosen/domU1/module@0 reg <0x43000000 0x7cc561>
> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
> rdinit=/sbin/init console=hvc0 earlycon=xenboot"
>
> fdt mknod /chosen/domU1 module@1
> fdt set /chosen/domU1/module@1 compatible "multiboot,ramdisk"
> "multiboot,module"
> fdt set /chosen/domU1/module@1 reg <0x48000000 0x11b680>
>
> booti 0x49000000 - 0x44000000
>
> On 6/10/19 2:24 PM, Denis Obrezkov wrote:
> > I found out that I can get rid of that error if I load the same image to
> > another address space with -device loader. But then I get the error:
> > (XEN) ***************************************************
> > (XEN) PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW
> > (XEN) ***************************************************
> > (XEN) 3... 2... 1...
> > (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
> > (XEN) *** LOADING DOMU cpus=1 memory=200000KB ***
> > (XEN) Loading Domd1 kernel from boot module @ 0000000043000000
> > (XEN) Loading ramdisk from boot module @ 0000000042000000
> > (XEN)
> > (XEN) ****************************************
> > (XEN) Panic on CPU 0:
> > (XEN) Out of memory
> > (XEN) ****************************************
> > (XEN)
> > (XEN) Reboot in five seconds...
> >
> > So, I don't understand how xen distribute the allocated memory and how
> > can it be allocated via a device tree.
> >
> > On 6/10/19 12:09 PM, Denis Obrezkov wrote:
> >> Hello,
> >>
> >> I  am trying to boot domU from a device tree. I want to use the same
> >> ramdisk and kernel image as for dom0. These are my u-boot commands:
> >>
> >> fdt addr 0x44000000
> >> fdt resize
> >> fdt set /chosen \#address-cells <1>
> >> fdt set /chosen \#size-cells <1>
> >> 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 mknod /chosen/domU1 module@0
> >> fdt set /chosen/domU1/module@0 compatible "xen,linux-zimage"
> >> "xen,multiboot-module"
> >> fdt set /chosen/domU1/module@0 reg <0x47000000 0x7cc561>
> >> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
> >> rdinit=/sbin/init console=hvc0 earlycon=xenboot"
> >>
> >> fdt mknod /chosen/domU1 module@1
> >> fdt set /chosen/domU1/module@1 compatible "xen,linux-initrd"
> >> "xen,multiboot-module"
> >> fdt set /chosen/domU1/module@1 reg <0x42000000 0x11b680>
> >>
> >> booti 0x49000000 - 0x44000000
> >>
> >> I got: 
> >>
> >> ....
> >>
> >> (XEN) *** LOADING DOMAIN 0 ***
> >> (XEN) Missing kernel boot module?
> >> (XEN)
> >> (XEN) ****************************************
> >> (XEN) Panic on CPU 0:
> >> (XEN) Could not set up DOM0 guest OS
> >> (XEN) ****************************************
> >> (XEN)
> >> (XEN) Reboot in five seconds...
> >>
> >> I wasn't able to find instructions on how to run domU and dom0 images
> >> simultaneously.
> >>
> >
>
> --
> Regards, Denis Obrezkov
>
>
Re: How to boot domU and dom0 from a device tree [ In reply to ]
On Mon, 10 Jun 2019, Denis Obrezkov wrote:
> Hello,
>
> I  am trying to boot domU from a device tree. I want to use the same
> ramdisk and kernel image as for dom0. These are my u-boot commands:
>
> fdt addr 0x44000000
> fdt resize
> fdt set /chosen \#address-cells <1>
> fdt set /chosen \#size-cells <1>
> 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 mknod /chosen/domU1 module@0
> fdt set /chosen/domU1/module@0 compatible "xen,linux-zimage"
> "xen,multiboot-module"
> fdt set /chosen/domU1/module@0 reg <0x47000000 0x7cc561>
> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
> rdinit=/sbin/init console=hvc0 earlycon=xenboot"
>
> fdt mknod /chosen/domU1 module@1
> fdt set /chosen/domU1/module@1 compatible "xen,linux-initrd"
> "xen,multiboot-module"
> fdt set /chosen/domU1/module@1 reg <0x42000000 0x11b680>

At least initially for debugging you want to also add a "vpl011" node
under /chosen/domU1 and pass console=ttyAMA0 in the DomU kernel command
line to have early output from the dom0less VMs. Make sure to enable the
pl011 uart driver in the kernel config for domU.

Also, make sure all the addresses are not overlapping. For instance:

0x42000000+0x11b680 => 0x4211b680 has to be less than 0x47000000

I don't see a problem here, but in general overlapping addresses is a
very common source of problems.


> booti 0x49000000 - 0x44000000
>
> I got: 
>
> ....
>
> (XEN) *** LOADING DOMAIN 0 ***
> (XEN) Missing kernel boot module?
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) Could not set up DOM0 guest OS
> (XEN) ****************************************
> (XEN)
> (XEN) Reboot in five seconds...
>
> I wasn't able to find instructions on how to run domU and dom0 images
> simultaneously.
>
> --
> Regards, Denis Obrezkov
>
>
>
Re: How to boot domU and dom0 from a device tree [ In reply to ]
Hi,

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.
>
>
>> 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>
>>
>> fdt mknod /chosen/domU1 module@0
>> fdt set /chosen/domU1/module@0 compatible "multiboot,kernel"
>> "multiboot,module"
>> fdt set /chosen/domU1/module@0 reg <0x43000000 0x7cc561>
>> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
>> rdinit=/sbin/init console=hvc0 earlycon=xenboot"
>>
>> fdt mknod /chosen/domU1 module@1
>> fdt set /chosen/domU1/module@1 compatible "multiboot,ramdisk"
>> "multiboot,module"
>> fdt set /chosen/domU1/module@1 reg <0x48000000 0x11b680>
>>
>> booti 0x49000000 - 0x44000000
>>
>> On 6/10/19 2:24 PM, Denis Obrezkov wrote:
>>> I found out that I can get rid of that error if I load the same image to
>>> another address space with -device loader. But then I get the error:
>>> (XEN) ***************************************************
>>> (XEN) PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW
>>> (XEN) ***************************************************
>>> (XEN) 3... 2... 1...
>>> (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
>>> (XEN) *** LOADING DOMU cpus=1 memory=200000KB ***
>>> (XEN) Loading Domd1 kernel from boot module @ 0000000043000000
>>> (XEN) Loading ramdisk from boot module @ 0000000042000000
>>> (XEN)
>>> (XEN) ****************************************
>>> (XEN) Panic on CPU 0:
>>> (XEN) Out of memory
>>> (XEN) ****************************************
>>> (XEN)
>>> (XEN) Reboot in five seconds...
>>>
>>> So, I don't understand how xen distribute the allocated memory and how
>>> can it be allocated via a device tree.
>>>
>>> On 6/10/19 12:09 PM, Denis Obrezkov wrote:
>>>> Hello,
>>>>
>>>> I  am trying to boot domU from a device tree. I want to use the same
>>>> ramdisk and kernel image as for dom0. These are my u-boot commands:
>>>>
>>>> fdt addr 0x44000000
>>>> fdt resize
>>>> fdt set /chosen \#address-cells <1>
>>>> fdt set /chosen \#size-cells <1>
>>>> 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 mknod /chosen/domU1 module@0
>>>> fdt set /chosen/domU1/module@0 compatible "xen,linux-zimage"
>>>> "xen,multiboot-module"
>>>> fdt set /chosen/domU1/module@0 reg <0x47000000 0x7cc561>
>>>> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
>>>> rdinit=/sbin/init console=hvc0 earlycon=xenboot"
>>>>
>>>> fdt mknod /chosen/domU1 module@1
>>>> fdt set /chosen/domU1/module@1 compatible "xen,linux-initrd"
>>>> "xen,multiboot-module"
>>>> fdt set /chosen/domU1/module@1 reg <0x42000000 0x11b680>
>>>>
>>>> booti 0x49000000 - 0x44000000
>>>>
>>>> I got: 
>>>>
>>>> ....
>>>>
>>>> (XEN) *** LOADING DOMAIN 0 ***
>>>> (XEN) Missing kernel boot module?
>>>> (XEN)
>>>> (XEN) ****************************************
>>>> (XEN) Panic on CPU 0:
>>>> (XEN) Could not set up DOM0 guest OS
>>>> (XEN) ****************************************
>>>> (XEN)
>>>> (XEN) Reboot in five seconds...
>>>>
>>>> I wasn't able to find instructions on how to run domU and dom0 images
>>>> simultaneously.
>>>>
>>>
>>
>> --
>> Regards, Denis Obrezkov
>>

--
Regards, Denis Obrezkov
Re: How to boot domU and dom0 from a device tree [ In reply to ]
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,

--
Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
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
Re: How to boot domU and dom0 from a device tree [ In reply to ]
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
>
>
Re: How to boot domU and dom0 from a device tree [ In reply to ]
As you are looking into dom0less, have you taken a look at this
example?

https://marc.info/?l=xen-devel&m=155675350818872

What do you think about it? Is it useful?


On Tue, 11 Jun 2019, 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
> >
> >
Re: How to boot domU and dom0 from a device tree [ In reply to ]
I also tried the latest stable linux kernel 5.1.9 and it's the same story.
I also thought that maybe xen just overwrites some values so I put domu
images and dtb to another memory region (>0x90000000) but the problem
still exists. And the same error when I try to boot domu without the
ramdisk.

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

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
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
Re: How to boot domU and dom0 from a device tree [ In reply to ]
On 11/06/2019 20:02, 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

Sending any attachment on the ML is strongly not recommended. Anything,
you send as an attachment will be stored in the mail account of each
person subscribed on the ML.

To give an example, your attachment is 9MB in total (compress), if you
had only 1024 users subscribed, this would mean 9G of disk used...

Cheers,

>
> 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
>>>>
>>
>

--
Julien Grall
_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
I agree I just don't know the right way for attachments on MLs

On 6/11/19 9:48 PM, Julien Grall wrote:
>
>
> On 11/06/2019 20:02, 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
>
> Sending any attachment on the ML is strongly not recommended. Anything,
> you send as an attachment will be stored in the mail account of each
> person subscribed on the ML.
>
> To give an example, your attachment is 9MB in total (compress), if you
> had only 1024 users subscribed, this would mean 9G of disk used...
>
> Cheers,
>
>>
>> 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
Re: How to boot domU and dom0 from a device tree [ In reply to ]
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.

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


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
>
>
Re: How to boot domU and dom0 from a device tree [ In reply to ]
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
Re: How to boot domU and dom0 from a device tree [ In reply to ]
Hi,

On 11/06/2019 21:23, Denis Obrezkov wrote:
> I agree I just don't know the right way for attachments on MLs

Text file are commonly posted on pastebin like website and then linked in the
thread. For bigger/binary files, you can either use google driver or upload to
your own website (if you have own).

Cheers,

>
> On 6/11/19 9:48 PM, Julien Grall wrote:
>>
>>
>> On 11/06/2019 20:02, 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
>>
>> Sending any attachment on the ML is strongly not recommended. Anything,
>> you send as an attachment will be stored in the mail account of each
>> person subscribed on the ML.
>>
>> To give an example, your attachment is 9MB in total (compress), if you
>> had only 1024 users subscribed, this would mean 9G of disk used...
>>
>> Cheers,
>>
>>>
>>> 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
>>>>>>
>>>>
>>>
>>
>

--
Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
Hi,
I have problems with domU console:
(XEN) Cannot send chars to Dom1: no UART available

this is a part of fdt command for domU:
fdt mknod /chosen/domU1 vpl011
fdt mknod /chosen/domU1 module@0
fdt set /chosen/domU1/module@0 compatible "multiboot,kernel" "multiboot,module"
fdt set /chosen/domU1/module@0 reg <0x53000000 0x1281a00>
fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
rdinit=/sbin/init console=hvc1"

fdt mknod /chosen/domU1 module@1
fdt set /chosen/domU1/module@1 compatible "multiboot,ramdisk" "multiboot,module"
fdt set /chosen/domU1/module@1 reg <0x58000000 0x121e65>

instead of hvc1 in console=hvc1 I tried hvc0, ttyS0 and ttyAMA0.
??, 12 ???. 2019 ?. ? 12:18, Julien Grall <julien.grall@arm.com>:
>
> Hi,
>
> On 11/06/2019 21:23, Denis Obrezkov wrote:
> > I agree I just don't know the right way for attachments on MLs
>
> Text file are commonly posted on pastebin like website and then linked in the
> thread. For bigger/binary files, you can either use google driver or upload to
> your own website (if you have own).
>
> Cheers,
>
> >
> > On 6/11/19 9:48 PM, Julien Grall wrote:
> >>
> >>
> >> On 11/06/2019 20:02, 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
> >>
> >> Sending any attachment on the ML is strongly not recommended. Anything,
> >> you send as an attachment will be stored in the mail account of each
> >> person subscribed on the ML.
> >>
> >> To give an example, your attachment is 9MB in total (compress), if you
> >> had only 1024 users subscribed, this would mean 9G of disk used...
> >>
> >> Cheers,
> >>
> >>>
> >>> 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
> >>>>>>
> >>>>
> >>>
> >>
> >
>
> --
> Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
On 12/06/2019 11:28, Denis Obrezkov wrote:
> Hi,

Hi,

> I have problems with domU console:
> (XEN) Cannot send chars to Dom1: no UART available
>
> this is a part of fdt command for domU:
> fdt mknod /chosen/domU1 vpl011
> fdt mknod /chosen/domU1 module@0
> fdt set /chosen/domU1/module@0 compatible "multiboot,kernel" "multiboot,module"
> fdt set /chosen/domU1/module@0 reg <0x53000000 0x1281a00>
> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
> rdinit=/sbin/init console=hvc1"
>
> fdt mknod /chosen/domU1 module@1
> fdt set /chosen/domU1/module@1 compatible "multiboot,ramdisk" "multiboot,module"
> fdt set /chosen/domU1/module@1 reg <0x58000000 0x121e65>
>
> instead of hvc1 in console=hvc1 I tried hvc0, ttyS0 and ttyAMA0.

It looks like to me the problem is not the DomU command line but Xen not
creating the emulated vpl011 for your DomU.

AFAICT, you requested U-boot to create the "vpl011" property, so Xen should
created the emulated vpl011.

The code to create the emulated vpl011 is domain_vpl011_init. Can you check
whether it is initialized?

Also, could you print the value for d, d->arch.vpl011.backend_in_domain,
d->arch.vpl011.xen just before you get the error message?

This could teach us a bit more what gone wrong.

Cheers,

--
Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
Hi,
> AFAICT, you requested U-boot to create the "vpl011" property, so Xen should
> created the emulated vpl011.
>
> The code to create the emulated vpl011 is domain_vpl011_init. Can you check
> whether it is initialized?
>
> Also, could you print the value for d, d->arch.vpl011.backend_in_domain,
> d->arch.vpl011.xen just before you get the error message?
>
> This could teach us a bit more what gone wrong.

How can I accomplish this? Should I print those variables and rebuilt xen or
should I connect a gdb somehow and check it?
>
> Cheers,
>
> --
> Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
Also, I don't understand why I have
vpl011 {
};
instead of:
vpl011;
as it is here https://marc.info/?l=xen-devel&m=155675350818872

??, 12 ???. 2019 ?. ? 12:59, Denis Obrezkov <denisobrezkov@gmail.com>:
>
> Hi,
> > AFAICT, you requested U-boot to create the "vpl011" property, so Xen should
> > created the emulated vpl011.
> >
> > The code to create the emulated vpl011 is domain_vpl011_init. Can you check
> > whether it is initialized?
> >
> > Also, could you print the value for d, d->arch.vpl011.backend_in_domain,
> > d->arch.vpl011.xen just before you get the error message?
> >
> > This could teach us a bit more what gone wrong.
>
> How can I accomplish this? Should I print those variables and rebuilt xen or
> should I connect a gdb somehow and check it?
> >
> > Cheers,
> >
> > --
> > Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
Oh, now it works!

I changed the line to: fdt set /chosen/domU1 \vpl011

??, 12 ???. 2019 ?. ? 13:07, Denis Obrezkov <denisobrezkov@gmail.com>:
>
> Also, I don't understand why I have
> vpl011 {
> };
> instead of:
> vpl011;
> as it is here https://marc.info/?l=xen-devel&m=155675350818872
>
> ??, 12 ???. 2019 ?. ? 12:59, Denis Obrezkov <denisobrezkov@gmail.com>:
> >
> > Hi,
> > > AFAICT, you requested U-boot to create the "vpl011" property, so Xen should
> > > created the emulated vpl011.
> > >
> > > The code to create the emulated vpl011 is domain_vpl011_init. Can you check
> > > whether it is initialized?
> > >
> > > Also, could you print the value for d, d->arch.vpl011.backend_in_domain,
> > > d->arch.vpl011.xen just before you get the error message?
> > >
> > > This could teach us a bit more what gone wrong.
> >
> > How can I accomplish this? Should I print those variables and rebuilt xen or
> > should I connect a gdb somehow and check it?
> > >
> > > Cheers,
> > >
> > > --
> > > Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
Hi,

Please avoiding top-posting.

On 12/06/2019 12:10, Denis Obrezkov wrote:
> Oh, now it works!
>
> I changed the line to: fdt set /chosen/domU1 \vpl011
I didn't notice you were using mknod before. Yes, vpl011 is a property not a node.

Also, why do you need \? Is it just a typo?

Cheers,

> ??, 12 ???. 2019 ?. ? 13:07, Denis Obrezkov <denisobrezkov@gmail.com>:
>>
>> Also, I don't understand why I have
>> vpl011 {
>> };
>> instead of:
>> vpl011;
>> as it is here https://marc.info/?l=xen-devel&m=155675350818872
>>
>> ??, 12 ???. 2019 ?. ? 12:59, Denis Obrezkov <denisobrezkov@gmail.com>:
>>>
>>> Hi,
>>>> AFAICT, you requested U-boot to create the "vpl011" property, so Xen should
>>>> created the emulated vpl011.
>>>>
>>>> The code to create the emulated vpl011 is domain_vpl011_init. Can you check
>>>> whether it is initialized?
>>>>
>>>> Also, could you print the value for d, d->arch.vpl011.backend_in_domain,
>>>> d->arch.vpl011.xen just before you get the error message?
>>>>
>>>> This could teach us a bit more what gone wrong.
>>>
>>> How can I accomplish this? Should I print those variables and rebuilt xen or
>>> should I connect a gdb somehow and check it?
>>>>
>>>> Cheers,
>>>>
>>>> --
>>>> Julien Grall

--
Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
Hi,

??, 12 ???. 2019 ?. ? 14:04, Julien Grall <julien.grall@arm.com>:
>
> Hi,
>
> Please avoiding top-posting.
Ok
>
> On 12/06/2019 12:10, Denis Obrezkov wrote:
> > Oh, now it works!
> >
> > I changed the line to: fdt set /chosen/domU1 \vpl011
> I didn't notice you were using mknod before. Yes, vpl011 is a property not a node.
>
> Also, why do you need \? Is it just a typo?
I followed the examples in xen. Probably it might not be needed.
>
> Cheers,
>
> > ??, 12 ???. 2019 ?. ? 13:07, Denis Obrezkov <denisobrezkov@gmail.com>:
> >>
> >> Also, I don't understand why I have
> >> vpl011 {
> >> };
> >> instead of:
> >> vpl011;
> >> as it is here https://marc.info/?l=xen-devel&m=155675350818872
> >>
> >> ??, 12 ???. 2019 ?. ? 12:59, Denis Obrezkov <denisobrezkov@gmail.com>:
> >>>
> >>> Hi,
> >>>> AFAICT, you requested U-boot to create the "vpl011" property, so Xen should
> >>>> created the emulated vpl011.
> >>>>
> >>>> The code to create the emulated vpl011 is domain_vpl011_init. Can you check
> >>>> whether it is initialized?
> >>>>
> >>>> Also, could you print the value for d, d->arch.vpl011.backend_in_domain,
> >>>> d->arch.vpl011.xen just before you get the error message?
> >>>>
> >>>> This could teach us a bit more what gone wrong.
> >>>
> >>> How can I accomplish this? Should I print those variables and rebuilt xen or
> >>> should I connect a gdb somehow and check it?
> >>>>
> >>>> Cheers,
> >>>>
> >>>> --
> >>>> Julien Grall
>
> --
> Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: How to boot domU and dom0 from a device tree [ In reply to ]
Hi,

On 12/06/2019 13:07, Denis Obrezkov wrote:
> ??, 12 ???. 2019 ?. ? 14:04, Julien Grall <julien.grall@arm.com>:
>> Please avoiding top-posting.
> Ok
>>
>> On 12/06/2019 12:10, Denis Obrezkov wrote:
>>> Oh, now it works!
>>>
>>> I changed the line to: fdt set /chosen/domU1 \vpl011
>> I didn't notice you were using mknod before. Yes, vpl011 is a property not a node.
>>
>> Also, why do you need \? Is it just a typo?
> I followed the examples in xen. Probably it might not be needed.

Can you give a pointer to that example in Xen?

Cheers,

--
Julien Grall

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

1 2  View All