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
nexedi
linux
Commits
4f085ca2
Commit
4f085ca2
authored
Jun 02, 2020
by
Alex Williamson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v5.8/vfio/kirti-migration-fixes' into v5.8/vfio/next
parents
ea20868c
c8e9df47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
drivers/vfio/vfio_iommu_type1.c
drivers/vfio/vfio_iommu_type1.c
+4
-3
No files found.
drivers/vfio/vfio_iommu_type1.c
View file @
4f085ca2
...
...
@@ -227,11 +227,12 @@ static void vfio_dma_bitmap_free(struct vfio_dma *dma)
static
void
vfio_dma_populate_bitmap
(
struct
vfio_dma
*
dma
,
size_t
pgsize
)
{
struct
rb_node
*
p
;
unsigned
long
pgshift
=
__ffs
(
pgsize
);
for
(
p
=
rb_first
(
&
dma
->
pfn_list
);
p
;
p
=
rb_next
(
p
))
{
struct
vfio_pfn
*
vpfn
=
rb_entry
(
p
,
struct
vfio_pfn
,
node
);
bitmap_set
(
dma
->
bitmap
,
(
vpfn
->
iova
-
dma
->
iova
)
/
pgsize
,
1
);
bitmap_set
(
dma
->
bitmap
,
(
vpfn
->
iova
-
dma
->
iova
)
>>
pgshift
,
1
);
}
}
...
...
@@ -997,14 +998,14 @@ static int update_user_bitmap(u64 __user *bitmap, struct vfio_iommu *iommu,
nbits
+
shift
);
if
(
copy_from_user
(
&
leftover
,
(
const
void
*
)(
bitmap
+
copy_offset
),
(
void
__user
*
)(
bitmap
+
copy_offset
),
sizeof
(
leftover
)))
return
-
EFAULT
;
bitmap_or
(
dma
->
bitmap
,
dma
->
bitmap
,
&
leftover
,
shift
);
}
if
(
copy_to_user
((
void
*
)(
bitmap
+
copy_offset
),
dma
->
bitmap
,
if
(
copy_to_user
((
void
__user
*
)(
bitmap
+
copy_offset
),
dma
->
bitmap
,
DIRTY_BITMAP_BYTES
(
nbits
+
shift
)))
return
-
EFAULT
;
...
...
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