Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
5df34a86
Commit
5df34a86
authored
Oct 11, 2007
by
Avi Kivity
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KVM: MMU: Move dirty bit updates to a separate function
Signed-off-by:
Avi Kivity
<
avi@qumranet.com
>
parent
6bfccdc9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
drivers/kvm/paging_tmpl.h
drivers/kvm/paging_tmpl.h
+15
-8
No files found.
drivers/kvm/paging_tmpl.h
View file @
5df34a86
...
...
@@ -69,6 +69,17 @@ struct guest_walker {
u32
error_code
;
};
static
void
FNAME
(
update_dirty_bit
)(
struct
kvm_vcpu
*
vcpu
,
int
write_fault
,
pt_element_t
*
ptep
,
gfn_t
table_gfn
)
{
if
(
write_fault
&&
!
is_dirty_pte
(
*
ptep
))
{
mark_page_dirty
(
vcpu
->
kvm
,
table_gfn
);
*
ptep
|=
PT_DIRTY_MASK
;
}
}
/*
* Fetch a guest pte for a guest virtual address
*/
...
...
@@ -144,10 +155,8 @@ static int FNAME(walk_addr)(struct guest_walker *walker,
if
(
walker
->
level
==
PT_PAGE_TABLE_LEVEL
)
{
walker
->
gfn
=
(
*
ptep
&
PT_BASE_ADDR_MASK
)
>>
PAGE_SHIFT
;
if
(
write_fault
&&
!
is_dirty_pte
(
*
ptep
))
{
mark_page_dirty
(
vcpu
->
kvm
,
table_gfn
);
*
ptep
|=
PT_DIRTY_MASK
;
}
FNAME
(
update_dirty_bit
)(
vcpu
,
write_fault
,
ptep
,
table_gfn
);
break
;
}
...
...
@@ -157,10 +166,8 @@ static int FNAME(walk_addr)(struct guest_walker *walker,
walker
->
gfn
=
(
*
ptep
&
PT_DIR_BASE_ADDR_MASK
)
>>
PAGE_SHIFT
;
walker
->
gfn
+=
PT_INDEX
(
addr
,
PT_PAGE_TABLE_LEVEL
);
if
(
write_fault
&&
!
is_dirty_pte
(
*
ptep
))
{
mark_page_dirty
(
vcpu
->
kvm
,
table_gfn
);
*
ptep
|=
PT_DIRTY_MASK
;
}
FNAME
(
update_dirty_bit
)(
vcpu
,
write_fault
,
ptep
,
table_gfn
);
break
;
}
...
...
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