[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] automation: xilinx: Add GEM passthrough test
commit ed6b7c0266e512c1207c07911da14e684f47b909 Author: Michal Orzel <michal.orzel@xxxxxxx> AuthorDate: Thu Apr 27 14:05:53 2023 +0200 Commit: Stefano Stabellini <stefano.stabellini@xxxxxxx> CommitDate: Tue May 9 13:34:50 2023 -0700 automation: xilinx: Add GEM passthrough test Being able to access a real board with real resources gives a great opportunity to finally test passthroughing devices to guests. Therefore, create a new Xilinx job to test GEM (Gigabit Ethernet MAC) controller passthrough to a dom0less domU. By passing "gem-passthrough" as a test variant, the test will instruct the ImageBuilder to use "eth0.dtb" (passthrough dtb stored under tftp server root) as a guest dtb and to add "xen,passthrough" dtb property to "/amba/ethernet@ff0e0000" node. The guest itself will try to bringup the network interface, obtain dynamically IP address and ping the default gateway. Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- automation/gitlab-ci/test.yaml | 8 ++++++++ automation/scripts/xilinx-smoke-dom0less-arm64.sh | 25 +++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 1ce083e6cd..55ca0c27dc 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -133,6 +133,14 @@ xilinx-smoke-dom0less-arm64-gcc: - *arm64-test-needs - alpine-3.12-gcc-arm64 +xilinx-smoke-dom0less-arm64-gcc-gem-passthrough: + extends: .xilinx-arm64 + script: + - ./automation/scripts/xilinx-smoke-dom0less-arm64.sh gem-passthrough 2>&1 | tee ${LOGFILE} + needs: + - *arm64-test-needs + - alpine-3.12-gcc-arm64 + adl-smoke-x86-64-gcc-debug: extends: .adl-x86-64 script: diff --git a/automation/scripts/xilinx-smoke-dom0less-arm64.sh b/automation/scripts/xilinx-smoke-dom0less-arm64.sh index 73ba251f4c..075305241c 100755 --- a/automation/scripts/xilinx-smoke-dom0less-arm64.sh +++ b/automation/scripts/xilinx-smoke-dom0less-arm64.sh @@ -22,6 +22,22 @@ echo \"${passed}\" " fi +if [[ "${test_variant}" == "gem-passthrough" ]]; then + passed="${test_variant} test passed" + + # For a passthroughed GEM: + # - bring up the network interface + # - dynamically assign IP + # - ping the default gateway + domU_check=" +set -ex +ifconfig eth0 up +udhcpc -i eth0 -n +ping -c 10 \$(ip route | awk '/^default/ {print \$3}') +echo \"${passed}\" +" +fi + # DomU mkdir -p rootfs cd rootfs @@ -96,6 +112,15 @@ cp -f binaries/domU-rootfs.cpio.gz $TFTP/ # export dtb to artifacts cp $TFTP/mpsoc_smmu.dtb . +if [[ "${test_variant}" == "gem-passthrough" ]]; then + echo " + DOMU_PASSTHROUGH_DTB[0]=\"eth0.dtb\" + DOMU_PASSTHROUGH_PATHS[0]=\"/amba/ethernet@ff0e0000\"" >> $TFTP/config + + # export passthrough dtb to artifacts + cp $TFTP/eth0.dtb . +fi + rm -rf imagebuilder git clone https://gitlab.com/ViryaOS/imagebuilder bash imagebuilder/scripts/uboot-script-gen -t tftp -d $TFTP/ -c $TFTP/config -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |