Repository navigation
zocl: release the AIE partition unless libdfx owns it - #10142
Merged
chvamshi-xilinx merged 2 commits intoOct 28, 2026
Merged
Conversation
Slot number is not a libdfx marker. Skip aie_partition_release only when the slot has a non-empty dtbo path, so a second run does not double-free a libdfx partition and a non-libdfx slot still releases the partition zocl requested. Co-authored-by: Cursor <cursoragent@cursor.com>
The current EDF flow sources edf-init-build-env and packages xrt into amd_cortexa72_common, not cortexa72_cortexa53. Copy those RPMs with the zocl packages and point the manifest at Yocto_edf_2026.2_10230002. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
chvamshi-xilinx
approved these changes
Oct 28, 2026
ManojTakasi
added a commit
to ManojTakasi/XRT
that referenced
this pull request
Oct 28, 2026
* zocl: release the AIE partition unless libdfx owns it Slot number is not a libdfx marker. Skip aie_partition_release only when the slot has a non-empty dtbo path, so a second run does not double-free a libdfx partition and a non-libdfx slot still releases the partition zocl requested. Co-authored-by: Cursor <cursoragent@cursor.com> * build: copy EDF xrt RPMs from the common arch directory The current EDF flow sources edf-init-build-env and packages xrt into amd_cortexa72_common, not cortexa72_cortexa53. Copy those RPMs with the zocl packages and point the manifest at Yocto_edf_2026.2_10230002. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit cf4177d)
chvamshi-xilinx
pushed a commit
that referenced
this pull request
Oct 28, 2026
* zocl: release the AIE partition unless libdfx owns it Slot number is not a libdfx marker. Skip aie_partition_release only when the slot has a non-empty dtbo path, so a second run does not double-free a libdfx partition and a non-libdfx slot still releases the partition zocl requested. * build: copy EDF xrt RPMs from the common arch directory The current EDF flow sources edf-init-build-env and packages xrt into amd_cortexa72_common, not cortexa72_cortexa53. Copy those RPMs with the zocl packages and point the manifest at Yocto_edf_2026.2_10230002. --------- (cherry picked from commit cf4177d) Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem solved by the commit
Slot 0 is used for both libdfx and non-libdfx loads.
zocl_detach_aie()skippedaie_partition_release()for every slot 0, so a non-libdfx load never released the AIE partition zocl had requested withaie_partition_request().On a libdfx load the destroy-hw-context ioctl runs first, and
libdfxRemoveOverlay()does the configfsrmdironly after that ioctl returns. Thatrmdirrunsaie_part_remove(). Releasing the partition inside the ioctl removes it a second time and oopses. That skip has to follow the libdfx dtbo path, not the slot index.Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
Follow-up to #10124 (CR-1285405). The slot-0 detach fixed the libdfx double remove, and it also skipped the release on a non-libdfx slot 0 load.
How problem was solved, alternative solutions (if any) and why they were rejected
zocl_destroy_aie()now skipsaie_partition_release()only whenslot->slot_xclbin->zx_dtbo_pathis non-empty. That path is stored at load time fromza_dtbo_path_len. An empty path is not libdfx, because the ioctl still passes a pointer.zocl_detach_aie()is removed, and both hardware-context destroy paths callzocl_destroy_aie().Keeping a second function that is identical except for the release call was rejected. The two paths differ by one condition, and that condition is known on the slot at destroy time.
Risks (if any) associated the changes in the commit
A libdfx slot with a non-empty dtbo path no longer releases the partition from zocl. The overlay
rmdirremains the singleaie_part_remove(). A non-libdfx slot, including slot 0, releases the partition it requested.zocl_aie_slot_reset()still releases unconditionally; the hardware-context exit path does not call reset.What has been tested and how, request additional testing if necessary
Tested both the testcases:
Documentation impact (if any)
None.