Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check for cfg_cu payload_size to be within MAX_CQ_SLOT_SIZE. #7630

Closed
wants to merge 3 commits into from

Conversation

ManojTakasi
Copy link
Collaborator

@ManojTakasi ManojTakasi commented Jul 18, 2023

Problem solved by the commit

If the cfg_cu payload size is more than expected after doubling, then making sure it should be within MAX_CQ_SLOT_SIZE.

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

Issue was intorduced by the CR-1162158

How problem was solved, alternative solutions (if any) and why they were rejected

Cherry-picked from the commit: 4e2b68f

Risks (if any) associated the changes in the commit

No

What has been tested and how, request additional testing if necessary

Tested on V70.

Documentation impact (if any)

No

saifuddin-xilinx and others added 3 commits June 16, 2023 17:31
* Fixed xgq assignment issue for multislot

Signed-off-by: Saif <saifuddi@amd.com>

* Fixed allignment issues

Signed-off-by: Saifuddin <saifuddi@xilinx.com>

* Cleanup memory manager for built in ps kernel support

Signed-off-by: Saifuddin <saifuddi@xilinx.com>

* Get the ps kernel mem info from zocl through xgq

* Fix issue to Get the ps kernel mem info from zocl through xgq

Signed-off-by: Saifuddin <saifuddi@xilinx.com>

* Not to fail the driver is PS kernel memory is not configured

* Fixed review comments

Signed-off-by: Saifuddin <saifuddi@xilinx.com>

* Added memory management changes to this branch

Signed-off-by: Saifuddin <saifuddi@xilinx.com>

* Delete unused variable

Signed-off-by: Saifuddin <saifuddi@xilinx.com>

* Fixed one issue

Signed-off-by: Saifuddin <saifuddi@xilinx.com>

* Remove the multislot fix from PS memory fix branch

Signed-off-by: Saifuddin <saifuddi@xilinx.com>

---------

Signed-off-by: Saif <saifuddi@amd.com>
Signed-off-by: Saifuddin <saifuddi@xilinx.com>
Co-authored-by: Saif <saifuddi@amd.com>
(cherry picked from commit 47b38ea)
…xocl_kds.c (Xilinx#7552)

* Added check for cfg_cu payload_size to be within MAX_CQ_SLOT_SIZE

Signed-off-by: Jeff Lin <jeffylin@xilinx.com>

* Added additional check for payload_size if it exceeds MAX_CQ_SLOT_SIZE before doubling and error out if it is exceeded.

Signed-off-by: Jeff Lin <jeffylin@xilinx.com>

---------

Signed-off-by: Jeff Lin <jeffylin@xilinx.com>
Co-authored-by: Jeff Lin <jeffylin@xilinx.com>
@@ -1955,6 +1955,10 @@ xocl_kds_xgq_cfg_cus(struct xocl_dev *xdev, xuid_t *xclbin_id, struct xrt_cu_inf
* approach.
*/
cfg_cu->payload_size = cfg_cu->payload_size * 2;
if(cfg_cu->payload_size > MAX_CQ_SLOT_SIZE) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (cfg_cu->payload_size > MAX_CQ_SLOT_SIZE) {

@gbuildx
Copy link
Collaborator

gbuildx commented Jul 18, 2023

Build failed :(

@chvamshi-xilinx
Copy link
Collaborator

retest this please

@gbuildx
Copy link
Collaborator

gbuildx commented Jul 18, 2023

Build failed :(

@chvamshi-xilinx
Copy link
Collaborator

There is already a PR for this #7577

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants