xen on hikey board --xen booted, but can not setup dom0 guest OS

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

xen on hikey board --xen booted, but can not setup dom0 guest OS

ls00722
Hi:
   I am hopping someone can give me a hint as I am brand new to xen. Here is
the boot log:

Shell> xen
Xen 4.11-unstable (c/s Thu Nov 9 12:15:00 2017 +0100 git:ec32054) EFI loader
Using configuration file 'xen.cfg'
hi6220-hikey.dtb: 0x000000007ac93000-0x000000007ac9c786
Image: 0x00000000796bc000-0x000000007ac87a00
 Xen 4.11-unstable
(XEN) Xen version 4.11-unstable (leisun@) (aarch64-linux-gnu-gcc (Linaro GCC
7.2-2017.11) 7.2.1 20171011) debug=y  Wed Dec 20 00:23:59 PST 2017
(XEN) Latest ChangeSet: Thu Nov 9 12:15:00 2017 +0100 git:ec32054
(XEN) Processor: 410fd033: "ARM Limited", variant: 0x0, part 0xd03, rev 0x3
(XEN) 64-bit Execution:
(XEN)   Processor Features: 0000000000002222 0000000000000000
(XEN)     Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
(XEN)     Extensions: FloatingPoint AdvancedSIMD
(XEN)   Debug Features: 0000000010305106 0000000000000000
(XEN)   Auxiliary Features: 0000000000000000 0000000000000000
(XEN)   Memory Model Features: 0000000000001122 0000000000000000
(XEN)   ISA Features:  0000000000011120 0000000000000000
(XEN) 32-bit Execution:
(XEN)   Processor Features: 00000131:00011011
(XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 03010066
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10101105 40000000 01260000 02102211
(XEN)  ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
(XEN) Using PSCI-1.0 for SMP bringup
(XEN) SMP: Allowing 8 CPUs
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 1200 KHz
(XEN) GICv2 initialization:
(XEN)         gic_dist_addr=00000000f6801000
(XEN)         gic_cpu_addr=00000000f6802000
(XEN)         gic_hyp_addr=00000000f6804000
(XEN)         gic_vcpu_addr=00000000f6806000
(XEN)         gic_maintenance_irq=25
(XEN) GICv2: 160 lines, 8 cpus, secure (IID 0200143b).
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 64 KiB.
(XEN) Bringing up CPU1
(XEN) CPU 1 booted.
(XEN) Bringing up CPU2
(XEN) CPU 2 booted.
(XEN) Bringing up CPU3
(XEN) CPU 3 booted.
(XEN) Bringing up CPU4
(XEN) CPU 4 booted.
(XEN) Bringing up CPU5
(XEN) CPU 5 booted.
(XEN) Bringing up CPU6
(XEN) CPU 6 booted.
(XEN) Bringing up CPU7
(XEN) CPU 7 booted.
(XEN) Brought up 8 CPUs
(XEN) P2M: 40-bit IPA with 40-bit PA and 8-bit VMID
(XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558
(XEN) I/O virtualisation disabled
(XEN) build-id: 6aeb25858ed490b5736cdaa6a3951d3500a9807d
(XEN) alternatives: Patching with alt table 00000000400bced0 ->
00000000400bd398
(XEN) grant_table.c:1680:IDLEv0 Expanding d0 grant table from 0 to 1 frames
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading kernel from boot module @ 00000000796bc000
(XEN) Allocating 1:1 mappings totalling 512MB for dom0:
(XEN) BANK[0] 0x00000040000000-0x00000060000000 (512MB)
(XEN) Grant table range: 0x0000007fa00000-0x0000007fa40000
*(XEN) IRQ 71 is already used by Xen
*(XEN) Unable to map IRQ71 to dom0**
(XEN) Device tree generation failed (-16).
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Could not set up DOM0 guest OS
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...

I used exact kernel version from wiki article(4.1) and also tried a newer
kernel version (4.9), they have the same result. Besides if I don't boot
xen, but do the default Linux boot, it stucked at:
*/EFI stub: Exiting boot services and installing virtual address map.../*

Any suggestion?

Thanks
Chris




--
Sent from: http://xen.1045712.n5.nabble.com/Xen-User-f2551083.html

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: xen on hikey board --xen booted, but can not setup dom0 guest OS

Julien Grall-3
(+ Konrad and Stefano)

Hello,

On 06/02/18 23:47, ls00722 wrote:

> Hi:
>     I am hopping someone can give me a hint as I am brand new to xen. Here is
> the boot log:
>
> Shell> xen
> Xen 4.11-unstable (c/s Thu Nov 9 12:15:00 2017 +0100 git:ec32054) EFI loader
> Using configuration file 'xen.cfg'
> hi6220-hikey.dtb: 0x000000007ac93000-0x000000007ac9c786
> Image: 0x00000000796bc000-0x000000007ac87a00
>   Xen 4.11-unstable
> (XEN) Xen version 4.11-unstable (leisun@) (aarch64-linux-gnu-gcc (Linaro GCC
> 7.2-2017.11) 7.2.1 20171011) debug=y  Wed Dec 20 00:23:59 PST 2017
> (XEN) Latest ChangeSet: Thu Nov 9 12:15:00 2017 +0100 git:ec32054
> (XEN) Processor: 410fd033: "ARM Limited", variant: 0x0, part 0xd03, rev 0x3
> (XEN) 64-bit Execution:
> (XEN)   Processor Features: 0000000000002222 0000000000000000
> (XEN)     Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
> (XEN)     Extensions: FloatingPoint AdvancedSIMD
> (XEN)   Debug Features: 0000000010305106 0000000000000000
> (XEN)   Auxiliary Features: 0000000000000000 0000000000000000
> (XEN)   Memory Model Features: 0000000000001122 0000000000000000
> (XEN)   ISA Features:  0000000000011120 0000000000000000
> (XEN) 32-bit Execution:
> (XEN)   Processor Features: 00000131:00011011
> (XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle
> (XEN)     Extensions: GenericTimer Security
> (XEN)   Debug Features: 03010066
> (XEN)   Auxiliary Features: 00000000
> (XEN)   Memory Model Features: 10101105 40000000 01260000 02102211
> (XEN)  ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
> (XEN) Using PSCI-1.0 for SMP bringup
> (XEN) SMP: Allowing 8 CPUs
> (XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 1200 KHz
> (XEN) GICv2 initialization:
> (XEN)         gic_dist_addr=00000000f6801000
> (XEN)         gic_cpu_addr=00000000f6802000
> (XEN)         gic_hyp_addr=00000000f6804000
> (XEN)         gic_vcpu_addr=00000000f6806000
> (XEN)         gic_maintenance_irq=25
> (XEN) GICv2: 160 lines, 8 cpus, secure (IID 0200143b).
> (XEN) Using scheduler: SMP Credit Scheduler (credit)
> (XEN) Allocated console ring of 64 KiB.
> (XEN) Bringing up CPU1
> (XEN) CPU 1 booted.
> (XEN) Bringing up CPU2
> (XEN) CPU 2 booted.
> (XEN) Bringing up CPU3
> (XEN) CPU 3 booted.
> (XEN) Bringing up CPU4
> (XEN) CPU 4 booted.
> (XEN) Bringing up CPU5
> (XEN) CPU 5 booted.
> (XEN) Bringing up CPU6
> (XEN) CPU 6 booted.
> (XEN) Bringing up CPU7
> (XEN) CPU 7 booted.
> (XEN) Brought up 8 CPUs
> (XEN) P2M: 40-bit IPA with 40-bit PA and 8-bit VMID
> (XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558
> (XEN) I/O virtualisation disabled
> (XEN) build-id: 6aeb25858ed490b5736cdaa6a3951d3500a9807d
> (XEN) alternatives: Patching with alt table 00000000400bced0 ->
> 00000000400bd398
> (XEN) grant_table.c:1680:IDLEv0 Expanding d0 grant table from 0 to 1 frames
> (XEN) *** LOADING DOMAIN 0 ***
> (XEN) Loading kernel from boot module @ 00000000796bc000
> (XEN) Allocating 1:1 mappings totalling 512MB for dom0:
> (XEN) BANK[0] 0x00000040000000-0x00000060000000 (512MB)
> (XEN) Grant table range: 0x0000007fa00000-0x0000007fa40000
> *(XEN) IRQ 71 is already used by Xen
> *(XEN) Unable to map IRQ71 to dom0**

IRQ 71 is a UART interrupt which, I guess, belongs to the UART used by
Xen. A brief look at the upstream DT, this should not be shared with any
other device.

Did you modify the DT?

> (XEN) Device tree generation failed (-16).
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) Could not set up DOM0 guest OS
> (XEN) ****************************************
> (XEN)
> (XEN) Reboot in five seconds...
>
> I used exact kernel version from wiki article(4.1) and also tried a newer
> kernel version (4.9), they have the same result. Besides if I don't boot
> xen, but do the default Linux boot, it stucked at:
> */EFI stub: Exiting boot services and installing virtual address map.../*

I have CCed Stefano and Konrad who are using that platform. They may be
help to you.

Cheers,

--
Julien Grall

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: xen on hikey board --xen booted, but can not setup dom0 guest OS

ls00722
Hi Julien:
  Thanks for the reply.

I was following this note:
https://github.com/Jeeppler/xen-note/blob/master/arm64/hikey/hikey-xen-centos.md

I didn't modify the DTB. and DTB was from the kernel directory. and the
kernel is from:
https://github.com/96boards/linux.git
commit "9e740973c9a71214a5873d2a5de42e5be7522989", as exactly as what the
wiki article mentioned.

I have xen.cfg content like this:
/options=dom0_mem=1024M dom0_max_vcpus=4 conswitch=x console=dtuart
dtuart=/smb/uart@f711300
kernel=Image console=hvc root=/dev/mmcblk0p9 rootwait rw
dtb=hi6220-hikey.dtb /

and I copied that dtb file to the microSD card.

What I just found out is that if i use dtb file come from kernel 4.1, the
xen boot stuck:

/Xen 4.11-unstable (c/s Thu Nov 9 12:15:00 2017 +0100 git:ec32054) EFI
loader
Using configuration file 'xen.cfg'
hi6220-hikey.dtb: 0x000000007ac91000-0x000000007ac9c6e0
Image: 0x0000000079f9b000-0x000000007ac83c00/  (stuck here and nothing more
printing out).

If I use the dtb file that come from kernel 4.9, the xen booted, but it
complains about IRQ71 remapping issue as in my first post.

So, seems like i don't have a known good dtb/dts file? So the problem is , i
can't re-create what wiki says.

Thanks
chris



--
Sent from: http://xen.1045712.n5.nabble.com/Xen-User-f2551083.html

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: xen on hikey board --xen booted, but can not setup dom0 guest OS

ls00722
Hi :
  I'd like to report that xen booted!
  The problem is that my xen.cfg is malformed,
"options=dom0_mem=1024M dom0_max_vcpus=4 conswitch=x console=dtuart
dtuart=/smb/uart@f711300" should be single line, but mine split into two
line. That was the culprit.

So the next question is, what's the procedure for installing second
OS(another Linux, let's say),are there any instruction for that?

Thanks
Chris



--
Sent from: http://xen.1045712.n5.nabble.com/Xen-User-f2551083.html

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: xen on hikey board --xen booted, but can not setup dom0 guest OS

Julien Grall-3
Hello,

On 08/02/18 00:14, ls00722 wrote:
> Hi :
>    I'd like to report that xen booted!
>    The problem is that my xen.cfg is malformed,
> "options=dom0_mem=1024M dom0_max_vcpus=4 conswitch=x console=dtuart
> dtuart=/smb/uart@f711300" should be single line, but mine split into two
> line. That was the culprit.
>
> So the next question is, what's the procedure for installing second
> OS(another Linux, let's say),are there any instruction for that?

Do you have a specific distribution in mind? For Debian/Ubuntu you can
use xen-create-image or qemu-debootstrap to create the rootfs.

Cheers,

--
Julien Grall

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: xen on hikey board --xen booted, but can not setup dom0 guest OS

ls00722
Hi julien/all:
  I realized that i have to have userspace tool available first (xl), it's
the other hurdle that i need to overcome first before creating domU
kernel/rootfs.

I am aware of this instruction:
https://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling#Xen_Version

Since it requires the chroot environment to be the same as dom0 and i found
out this:
https://github.com/Jeeppler/xen-note/blob/master/arm64/hikey/hikey-xen-build-tools.md

Is more closer to what I have, except my build machine is ubuntu(32 bit).
So I was following above procedure, and everything seems fine until I try to
configure xen:

/(chroot)#sudo CONFIG_SITE=/etc/dpkg-cross/cross-config.arm64 ./configure
--build=i686-unknown-linux-gnu --host=aarch64-linux-gnu/

It complains:

/checking for glib... no
configure: error: Package requirements (glib-2.0 >= 2.12) were not met:

No package 'glib-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix./

And my chroot environment does seem to have glib-2.0 installed, running
"dpkg -l | grep arm64"

/ii  libglib2.0-0:arm64           2.42.1-1+b1                      arm64      
GLib library of C routines
ii  libglib2.0-dev               2.42.1-1+b1                      arm64      
Development files for the GLib library/

I also noticed that when i was installing the "libglib2.0-dev:arm64 " as
specified in the instruction.

I have this messages at the end of apt-get install:

/Processing triggers for libglib2.0-0:arm64 (2.42.1-1+b1) ...
/var/lib/dpkg/info/libglib2.0-0:arm64.postinst: 13:
/var/lib/dpkg/info/libglib2.0-0:arm64.postinst:
/usr/lib/aarch64-linux-gnu/glib-2.0/glib-compile-schemas: not found
Processing triggers for libglib2.0-0:i386 (2.42.1-1+b1) ...
No schema files found: doing nothing.
Setting up libglib2.0-dev (2.42.1-1+b1) .../

At this point, i am not sure which step i did was wrong and lead this...

Thanks
Lei





--
Sent from: http://xen.1045712.n5.nabble.com/Xen-User-f2551083.html

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: xen on hikey board --xen booted, but can not setup dom0 guest OS

Stefano Stabellini-4
In reply to this post by Julien Grall-3
On Wed, 7 Feb 2018, Julien Grall wrote:

> (+ Konrad and Stefano)
>
> Hello,
>
> On 06/02/18 23:47, ls00722 wrote:
> > Hi:
> >     I am hopping someone can give me a hint as I am brand new to xen. Here
> > is
> > the boot log:
> >
> > Shell> xen
> > Xen 4.11-unstable (c/s Thu Nov 9 12:15:00 2017 +0100 git:ec32054) EFI loader
> > Using configuration file 'xen.cfg'
> > hi6220-hikey.dtb: 0x000000007ac93000-0x000000007ac9c786
> > Image: 0x00000000796bc000-0x000000007ac87a00
> >   Xen 4.11-unstable
> > (XEN) Xen version 4.11-unstable (leisun@) (aarch64-linux-gnu-gcc (Linaro GCC
> > 7.2-2017.11) 7.2.1 20171011) debug=y  Wed Dec 20 00:23:59 PST 2017
> > (XEN) Latest ChangeSet: Thu Nov 9 12:15:00 2017 +0100 git:ec32054
> > (XEN) Processor: 410fd033: "ARM Limited", variant: 0x0, part 0xd03, rev 0x3
> > (XEN) 64-bit Execution:
> > (XEN)   Processor Features: 0000000000002222 0000000000000000
> > (XEN)     Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
> > (XEN)     Extensions: FloatingPoint AdvancedSIMD
> > (XEN)   Debug Features: 0000000010305106 0000000000000000
> > (XEN)   Auxiliary Features: 0000000000000000 0000000000000000
> > (XEN)   Memory Model Features: 0000000000001122 0000000000000000
> > (XEN)   ISA Features:  0000000000011120 0000000000000000
> > (XEN) 32-bit Execution:
> > (XEN)   Processor Features: 00000131:00011011
> > (XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle
> > (XEN)     Extensions: GenericTimer Security
> > (XEN)   Debug Features: 03010066
> > (XEN)   Auxiliary Features: 00000000
> > (XEN)   Memory Model Features: 10101105 40000000 01260000 02102211
> > (XEN)  ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
> > (XEN) Using PSCI-1.0 for SMP bringup
> > (XEN) SMP: Allowing 8 CPUs
> > (XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 1200 KHz
> > (XEN) GICv2 initialization:
> > (XEN)         gic_dist_addr=00000000f6801000
> > (XEN)         gic_cpu_addr=00000000f6802000
> > (XEN)         gic_hyp_addr=00000000f6804000
> > (XEN)         gic_vcpu_addr=00000000f6806000
> > (XEN)         gic_maintenance_irq=25
> > (XEN) GICv2: 160 lines, 8 cpus, secure (IID 0200143b).
> > (XEN) Using scheduler: SMP Credit Scheduler (credit)
> > (XEN) Allocated console ring of 64 KiB.
> > (XEN) Bringing up CPU1
> > (XEN) CPU 1 booted.
> > (XEN) Bringing up CPU2
> > (XEN) CPU 2 booted.
> > (XEN) Bringing up CPU3
> > (XEN) CPU 3 booted.
> > (XEN) Bringing up CPU4
> > (XEN) CPU 4 booted.
> > (XEN) Bringing up CPU5
> > (XEN) CPU 5 booted.
> > (XEN) Bringing up CPU6
> > (XEN) CPU 6 booted.
> > (XEN) Bringing up CPU7
> > (XEN) CPU 7 booted.
> > (XEN) Brought up 8 CPUs
> > (XEN) P2M: 40-bit IPA with 40-bit PA and 8-bit VMID
> > (XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558
> > (XEN) I/O virtualisation disabled
> > (XEN) build-id: 6aeb25858ed490b5736cdaa6a3951d3500a9807d
> > (XEN) alternatives: Patching with alt table 00000000400bced0 ->
> > 00000000400bd398
> > (XEN) grant_table.c:1680:IDLEv0 Expanding d0 grant table from 0 to 1 frames
> > (XEN) *** LOADING DOMAIN 0 ***
> > (XEN) Loading kernel from boot module @ 00000000796bc000
> > (XEN) Allocating 1:1 mappings totalling 512MB for dom0:
> > (XEN) BANK[0] 0x00000040000000-0x00000060000000 (512MB)
> > (XEN) Grant table range: 0x0000007fa00000-0x0000007fa40000
> > *(XEN) IRQ 71 is already used by Xen
> > *(XEN) Unable to map IRQ71 to dom0**
>
> IRQ 71 is a UART interrupt which, I guess, belongs to the UART used by Xen. A
> brief look at the upstream DT, this should not be shared with any other
> device.
>
> Did you modify the DT?

Yes, good question. Where is the device tree coming from? I would use
the one from the kernel branch you selected.


> > (XEN) Device tree generation failed (-16).
> > (XEN)
> > (XEN) ****************************************
> > (XEN) Panic on CPU 0:
> > (XEN) Could not set up DOM0 guest OS
> > (XEN) ****************************************
> > (XEN)
> > (XEN) Reboot in five seconds...
> >
> > I used exact kernel version from wiki article(4.1) and also tried a newer
> > kernel version (4.9), they have the same result. Besides if I don't boot
> > xen, but do the default Linux boot, it stucked at:
> > */EFI stub: Exiting boot services and installing virtual address map.../*
>
> I have CCed Stefano and Konrad who are using that platform. They may be help
> to you.

I don't recall seeing this error. However, I do remember that the kernel
support is a bit flaky, meaning that you really need to make sure to use
the kernel config provided
(http://xenbits.xen.org/people/sstabellini/config-hikey) and the device
tree from the kernel tree.

_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users