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

signal fence_w_ip only if iofence completes #367

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions iommu_ref_model/libiommu/src/iommu_command_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,6 @@ do_iofence_c(
if ( PR == 1 || PW == 1 )
iommu_to_hb_do_global_observability_sync(PR, PW);

// The wired-signaled-interrupt (WSI) bit when set to 1 causes a wired-interrupt from the command
// queue to be generated on completion of IOFENCE.C. This bit is reserved if the IOMMU supports MSI
if ( g_reg_file.cqcsr.fence_w_ip == 0 && WSI_BIT == 1 ) {
g_reg_file.cqcsr.fence_w_ip = 1;
generate_interrupt(COMMAND_QUEUE);
}
// The AV command operand indicates if ADDR[63:2] operand and DATA operands are valid.
// If AV=1, the IOMMU writes DATA to memory at a 4-byte aligned address ADDR[63:2] * 4 as
// a 4-byte store.
Expand All @@ -501,6 +495,12 @@ do_iofence_c(
return 1;
}
}
// The wired-signaled-interrupt (WSI) bit when set to 1 causes a wired-interrupt from the command
// queue to be generated on completion of IOFENCE.C. This bit is reserved if the IOMMU supports MSI
if ( g_reg_file.cqcsr.fence_w_ip == 0 && WSI_BIT == 1 ) {
g_reg_file.cqcsr.fence_w_ip = 1;
generate_interrupt(COMMAND_QUEUE);
}
return 0;
}
// Retry a pending IOFENCE if all invalidations received
Expand Down
Loading