diff options
author | Bertrand Marquis <bertrand.marquis@arm.com> | 2022-05-10 16:35:16 +0100 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-05-18 13:52:14 -0400 |
commit | fb0a7b97db4f419b82309f98a4944ae3330d1e2e (patch) | |
tree | 80e32dcd6b662ab06fe1abb1da58366b8d72ac04 /classes | |
parent | b5b3fcf492922ed1261f9c93ed2b9aead7183803 (diff) | |
download | meta-virtualization-fb0a7b97db4f419b82309f98a4944ae3330d1e2e.tar.gz |
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>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/qemuboot-xen-dtb.bbclass | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/classes/qemuboot-xen-dtb.bbclass b/classes/qemuboot-xen-dtb.bbclass index d43d23a3..1f17a869 100644 --- a/classes/qemuboot-xen-dtb.bbclass +++ b/classes/qemuboot-xen-dtb.bbclass | |||
@@ -63,6 +63,21 @@ write_lops_xen_section() { | |||
63 | EOF | 63 | EOF |
64 | } | 64 | } |
65 | 65 | ||
66 | write_lop_rm_pci() { | ||
67 | cat <<EOF >"$1" | ||
68 | /dts-v1/; | ||
69 | / { | ||
70 | compatible = "system-device-tree-v1"; | ||
71 | lops { | ||
72 | lop_1 { | ||
73 | compatible = "system-device-tree-v1,lop,modify"; | ||
74 | modify = "/pcie@10000000::"; | ||
75 | }; | ||
76 | }; | ||
77 | }; | ||
78 | EOF | ||
79 | } | ||
80 | |||
66 | write_lop_add_to_xen_cmdline() { | 81 | write_lop_add_to_xen_cmdline() { |
67 | EXTRA_XEN_BOOTARGS="$2" | 82 | EXTRA_XEN_BOOTARGS="$2" |
68 | cat <<EOF >"$1" | 83 | cat <<EOF >"$1" |
@@ -135,6 +150,13 @@ generate_xen_qemuboot_dtb() { | |||
135 | write_lop_add_to_xen_cmdline "${B}/lop-xen-cmdline.dts" \ | 150 | write_lop_add_to_xen_cmdline "${B}/lop-xen-cmdline.dts" \ |
136 | "${QB_XEN_CMDLINE_EXTRA}" | 151 | "${QB_XEN_CMDLINE_EXTRA}" |
137 | 152 | ||
153 | # On Qemu Arm32, Dom0 accessing PCI config space ends up in an | ||
154 | # infinite loop. Remove pci node from the device tree | ||
155 | if [ "${MACHINE}" = "qemuarm" ]; then | ||
156 | write_lop_rm_pci "${B}/lop-rm-pci.dts" | ||
157 | LOP_MODULE_ARGS="${LOP_MODULE_ARGS} -i ${B}/lop-rm-pci.dts" | ||
158 | fi | ||
159 | |||
138 | if [ -z "${QB_XEN_DOMAIN_MODULES}" ]; then | 160 | if [ -z "${QB_XEN_DOMAIN_MODULES}" ]; then |
139 | bbwarn "No domain modules: please set QB_XEN_DOMAIN_MODULES" | 161 | bbwarn "No domain modules: please set QB_XEN_DOMAIN_MODULES" |
140 | fi | 162 | fi |