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
38c335f1
Commit
38c335f1
authored
Nov 21, 2007
by
Avi Kivity
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KVM: MMU: Adjust page_header_update_slot() to accept a gfn instead of a gpa
Signed-off-by:
Avi Kivity
<
avi@qumranet.com
>
parent
230c9a8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
drivers/kvm/mmu.c
drivers/kvm/mmu.c
+4
-3
drivers/kvm/paging_tmpl.h
drivers/kvm/paging_tmpl.h
+1
-2
No files found.
drivers/kvm/mmu.c
View file @
38c335f1
...
...
@@ -860,9 +860,9 @@ static void mmu_unshadow(struct kvm *kvm, gfn_t gfn)
}
}
static
void
page_header_update_slot
(
struct
kvm
*
kvm
,
void
*
pte
,
g
pa_t
gpa
)
static
void
page_header_update_slot
(
struct
kvm
*
kvm
,
void
*
pte
,
g
fn_t
gfn
)
{
int
slot
=
memslot_id
(
kvm
,
gfn_to_memslot
(
kvm
,
g
pa
>>
PAGE_SHIFT
));
int
slot
=
memslot_id
(
kvm
,
gfn_to_memslot
(
kvm
,
g
fn
));
struct
kvm_mmu_page
*
page_head
=
page_header
(
__pa
(
pte
));
__set_bit
(
slot
,
&
page_head
->
slot_bitmap
);
...
...
@@ -928,7 +928,8 @@ static int nonpaging_map(struct kvm_vcpu *vcpu, gva_t v, hpa_t p)
return
0
;
}
mark_page_dirty
(
vcpu
->
kvm
,
v
>>
PAGE_SHIFT
);
page_header_update_slot
(
vcpu
->
kvm
,
table
,
v
);
page_header_update_slot
(
vcpu
->
kvm
,
table
,
v
>>
PAGE_SHIFT
);
table
[
index
]
=
p
|
PT_PRESENT_MASK
|
PT_WRITABLE_MASK
|
PT_USER_MASK
;
if
(
!
was_rmapped
)
...
...
drivers/kvm/paging_tmpl.h
View file @
38c335f1
...
...
@@ -259,8 +259,7 @@ static void FNAME(set_pte)(struct kvm_vcpu *vcpu, pt_element_t gpte,
pgprintk
(
"%s: setting spte %llx
\n
"
,
__FUNCTION__
,
spte
);
set_shadow_pte
(
shadow_pte
,
spte
);
page_header_update_slot
(
vcpu
->
kvm
,
shadow_pte
,
(
gpa_t
)
gfn
<<
PAGE_SHIFT
);
page_header_update_slot
(
vcpu
->
kvm
,
shadow_pte
,
gfn
);
if
(
!
was_rmapped
)
{
rmap_add
(
vcpu
,
shadow_pte
,
gfn
);
if
(
!
is_rmap_pte
(
*
shadow_pte
))
...
...
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