fix(vt-d): invalidate cache when initializing and updating#665
Open
ytakano wants to merge 17 commits intotier4:mainfrom
Open
fix(vt-d): invalidate cache when initializing and updating#665ytakano wants to merge 17 commits intotier4:mainfrom
ytakano wants to merge 17 commits intotier4:mainfrom
Conversation
1. do not use the global status register value for the global command register 2. wait untile enabled after updatating the global command register 3. print more registers for debugging Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Signed-off-by: Yuuki Takano <ytakanoster@gmail.com>
Koichi98
reviewed
Jan 26, 2026
|
|
||
| // Check for completion | ||
| core::sync::atomic::fence(core::sync::atomic::Ordering::Acquire); | ||
| if status[0] != 0 { |
Contributor
There was a problem hiding this comment.
We should check for status[vtd_unit.index]?
| core::sync::atomic::fence(core::sync::atomic::Ordering::Release); | ||
|
|
||
| let mut node = MCSNode::new(); | ||
| let vtd_units = IOMMU[self.segment_number].vtd_units.lock(&mut node); |
Contributor
There was a problem hiding this comment.
Maybe better to add comment about the order of lock acquisition(interrupt_remapping->vtd_units).
| } | ||
| } | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
Better to add some kind of handling for timeout?
| array![_ => Mutex::new(None); 32]; | ||
| static IOMMU: [IommuInfo; 32] = array![x => | ||
| IommuInfo { | ||
| segment_number: x, |
Contributor
There was a problem hiding this comment.
It looks like segment_number always being the same with the array index. Maybe we can delete segment_number field but do you want to keep it to make it explicit?
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.
Description
VT-d Interrupt Remapping Implementation and Enhancements.
Invalidate the cache of interrupt remapping when initializing and updating.
Cache Invalidation
IOMMU State Management
IommuInfoandVtdUnitstructures.IOMMUglobal variable to track both VT-d units and interrupt remapping tablesRelated links
https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://cdrdv2-public.intel.com/671081/vt-directed-io-spec.pdf&ved=2ahUKEwjJ1oCiufaRAxWPnq8BHVbbLy8QFnoECAwQAQ&usg=AOvVaw3fO9wnba58SqsP2HNKwdfu
How was this PR tested?
Tested on a physical x86_64 machine.
Notes for reviewers