fix(vt-d): VT-d interrupt remapping initialization with Invalidation Queue support #664
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.
Description
VT-d Interrupt Remapping: Initialization with Proper Error Handling
Summary
Initialization of Intel VT-d interrupt remapping with Invalidation Queue support, proper error handling, and spec-compliant GLOBAL_COMMAND register updates.
Changes
Invalidation Queue Implementation
init_invalidation_queue()functionError Handling Improvements
Introduced
VtdErrorenum replacing generic error stringsIrtpEnableFailed- Interrupt Remapping Table Pointer enable failureIreEnableFailed- Interrupt Remapping enable failureQieEnableFailed- Queued Invalidation enable failureDmaAllocationFailed- DMA memory allocation failureTimeout- Command completion timeoutDisplaytrait for human-readable messagesUpdated function signatures to return
Result<(), VtdError>init_interrupt_remap()- changed fromResult<(), &'static str>set_irta()- changed from()toResult<(), VtdError>init_invalidation_queue()- changed from()toResult<(), VtdError>Spec-Compliant GLOBAL_COMMAND Updates
update_global_command()helper functionRegister-Based Invalidation Completion
Added a new register definition
ICS(offset 0x9c) - Invalidation Completion Status RegisterImplemented
wait_register_based_invalidation_complete()Related links
How was this PR tested?
Tested on an x86_64 machine.
Notes for reviewers