Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
907fea34
Commit
907fea34
authored
Oct 13, 2015
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iommu/vt-d: Implement deferred invalidate for SVM
Signed-off-by:
David Woodhouse
<
David.Woodhouse@intel.com
>
parent
2f26e0a9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
drivers/iommu/intel-iommu.c
drivers/iommu/intel-iommu.c
+2
-0
drivers/iommu/intel-svm.c
drivers/iommu/intel-svm.c
+9
-0
include/linux/dma_remapping.h
include/linux/dma_remapping.h
+1
-0
No files found.
drivers/iommu/intel-iommu.c
View file @
907fea34
...
...
@@ -4981,6 +4981,8 @@ int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct intel_svm_dev *sd
ctx_lo
|=
CONTEXT_TT_PT_PASID
<<
2
;
}
ctx_lo
|=
CONTEXT_PASIDE
;
if
(
iommu
->
pasid_state_table
)
ctx_lo
|=
CONTEXT_DINVE
;
context
[
0
].
lo
=
ctx_lo
;
wmb
();
iommu
->
flush
.
flush_context
(
iommu
,
sdev
->
did
,
sdev
->
sid
,
...
...
drivers/iommu/intel-svm.c
View file @
907fea34
...
...
@@ -26,6 +26,10 @@ struct pasid_entry {
u64
val
;
};
struct
pasid_state_entry
{
u64
val
;
};
int
intel_svm_alloc_pasid_tables
(
struct
intel_iommu
*
iommu
)
{
struct
page
*
pages
;
...
...
@@ -127,6 +131,11 @@ static void intel_flush_svm_range(struct intel_svm *svm, unsigned long address,
{
struct
intel_svm_dev
*
sdev
;
/* Try deferred invalidate if available */
if
(
svm
->
iommu
->
pasid_state_table
&&
!
cmpxchg64
(
&
svm
->
iommu
->
pasid_state_table
[
svm
->
pasid
].
val
,
0
,
1ULL
<<
63
))
return
;
rcu_read_lock
();
list_for_each_entry_rcu
(
sdev
,
&
svm
->
devs
,
list
)
intel_flush_svm_range_dev
(
svm
,
sdev
,
address
,
pages
,
ih
);
...
...
include/linux/dma_remapping.h
View file @
907fea34
...
...
@@ -25,6 +25,7 @@
#define CONTEXT_TT_PT_PASID_DEV_IOTLB 5
#define CONTEXT_TT_MASK (7ULL << 2)
#define CONTEXT_DINVE (1ULL << 8)
#define CONTEXT_PRS (1ULL << 9)
#define CONTEXT_PASIDE (1ULL << 11)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment