aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Marquis <bertrand.marquis@arm.com>2022-05-10 16:35:16 +0100
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-05-18 13:56:43 -0400
commit2fae71cdf0e8c6f398f51219bdf31eac76c662ec (patch)
tree80e32dcd6b662ab06fe1abb1da58366b8d72ac04
parentedd6b20c6a1c79007a0abc90d96da1d014b79e2f (diff)
downloadmeta-virtualization-2fae71cdf0e8c6f398f51219bdf31eac76c662ec.tar.gz
meta-virtualization-2fae71cdf0e8c6f398f51219bdf31eac76c662ec.tar.bz2
meta-virtualization-2fae71cdf0e8c6f398f51219bdf31eac76c662ec.zip
xen: Disable PCI on qemuarm with Xen
Remove the pci node from the qemu device tree when runqemu is used with xen-qemuboot. Linux is ending up in an infinite loop when trying to access PCI configuration space when running on top of Xen on arm32. As we do not need or support any of the devices on PCI on arm32 at the moment, just remove the node from the device tree generated by qemu. The problem does not appear at the moment without Xen and it is unclear why it is with Xen. This will be investigated but in the meantime provide a working configuration for users. Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--classes/qemuboot-xen-dtb.bbclass22
1 files changed, 22 insertions, 0 deletions
diff --git a/classes/qemuboot-xen-dtb.bbclass b/classes/qemuboot-xen-dtb.bbclass
index d43d23a..1f17a86 100644
--- a/classes/qemuboot-xen-dtb.bbclass
+++ b/classes/qemuboot-xen-dtb.bbclass
@@ -63,6 +63,21 @@ write_lops_xen_section() {
EOF
}
+write_lop_rm_pci() {
+ cat <<EOF >"$1"
+/dts-v1/;
+/ {
+ compatible = "system-device-tree-v1";
+ lops {
+ lop_1 {
+ compatible = "system-device-tree-v1,lop,modify";
+ modify = "/pcie@10000000::";
+ };
+ };
+};
+EOF
+}
+
write_lop_add_to_xen_cmdline() {
EXTRA_XEN_BOOTARGS="$2"
cat <<EOF >"$1"
@@ -135,6 +150,13 @@ generate_xen_qemuboot_dtb() {
write_lop_add_to_xen_cmdline "${B}/lop-xen-cmdline.dts" \
"${QB_XEN_CMDLINE_EXTRA}"
+ # On Qemu Arm32, Dom0 accessing PCI config space ends up in an
+ # infinite loop. Remove pci node from the device tree
+ if [ "${MACHINE}" = "qemuarm" ]; then
+ write_lop_rm_pci "${B}/lop-rm-pci.dts"
+ LOP_MODULE_ARGS="${LOP_MODULE_ARGS} -i ${B}/lop-rm-pci.dts"
+ fi
+
if [ -z "${QB_XEN_DOMAIN_MODULES}" ]; then
bbwarn "No domain modules: please set QB_XEN_DOMAIN_MODULES"
fi