cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dlorych
Visitor
Visitor
422 Views
Registered: ‎09-14-2020

Petalinux 2020.1 not packaging / building Xen correctly

Jump to solution

Hi,

 

I have upgraded a project using Xen from Petalinux 2019.2 to 2020.1 and since then Xen is not working correctly anymore. I am using the steps for building Xen from the wiki, so I am not sure what could be wrong (https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/384663561/Building+Xen+Hypervisor+with+Petalinux+2020.1).

During boot of the dom0 (host) i get those errors:

[FAILED] Failed to start The Xen xenstore.
See 'systemctl status xenstored.service' for details.
[DEPEND] Dependency failed for Xenc…guest consoles and hypervisor.
[DEPEND] Dependency failed for xen-…des, JSON configuration stub).
[DEPEND] Dependency failed for qemu for xen dom0 disk backend.
[DEPEND] Dependency failed for Xend…p guests on boot and shutdown.

And xenstored could not get started because of a missing gnttab, but /usr/lib/libxengnttab.so.1 is in the file system, I dont know why it cant find it there:

* xenstored.service - The Xen xenstore
Loaded: loaded (/lib/systemd/system/xenstored.service; enabled; vendor preset: enabled)
Active: failed (Result: protocol) since Thu 2020-11-19 09:51:59 UTC; 1min 53s ago
Process: 210 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities (code=exited, status=0/SUCCESS)
Process: 215 ExecStart=/etc/xen/scripts/launch-xenstore (code=exited, status=0/SUCCESS)
Main PID: 215 (code=exited, status=0/SUCCESS)

Nov 19 09:51:58 xilinx-zcu104-20201 systemd[1]: Starting The Xen xenstore...
Nov 19 09:51:59 xilinx-zcu104-20201 launch-xenstore[215]: Starting /usr/sbin/xenstored...FATAL: Failed to open connection to gnttab: No such file or directory
Nov 19 09:51:59 xilinx-zcu104-20201 systemd[1]: xenstored.service: Failed with result 'protocol'.
Nov 19 09:51:59 xilinx-zcu104-20201 systemd[1]: Failed to start The Xen xenstore.

 

Does anyone have an idea why Xen is not working anymore under 2020.1?

Thankes.

0 Kudos
1 Solution

Accepted Solutions
dlorych
Visitor
Visitor
261 Views
Registered: ‎09-14-2020

The underlying problem was that the packagegroup for xen forces the kernel config option 'CONFIG_XEN_GNTDEV' to be used as a module, while it needs to be enabled statically (see https://wiki.xenproject.org/wiki/Mainline_Linux_Kernel_Configs ). I enabled the option and created a packagegroup-petalinux-xen.bbappend which removes the condition for 'kernel-module-xen-gntdev', now it works like it should.

@Mods: I suggest notifying the devs that the xen-packagegroup is incorrect.

View solution in original post

0 Kudos
2 Replies
dlorych
Visitor
Visitor
310 Views
Registered: ‎09-14-2020

After the problem still persisted in Petalinux 2020.2, I investigated the problem a bit more this time. I am still not sure why Xenstored is failing to find gnttab because it is included in the rootfs, but if i just run '/usr/sbin/xenstored' after booting then it works. So it seems like Xenstored can't find the library during boot, but can find it after the boot is complete.

0 Kudos
dlorych
Visitor
Visitor
262 Views
Registered: ‎09-14-2020

The underlying problem was that the packagegroup for xen forces the kernel config option 'CONFIG_XEN_GNTDEV' to be used as a module, while it needs to be enabled statically (see https://wiki.xenproject.org/wiki/Mainline_Linux_Kernel_Configs ). I enabled the option and created a packagegroup-petalinux-xen.bbappend which removes the condition for 'kernel-module-xen-gntdev', now it works like it should.

@Mods: I suggest notifying the devs that the xen-packagegroup is incorrect.

View solution in original post

0 Kudos