diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2010-05-15 18:52:34 +0800 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 10:35:50 +0300 |
commit | e02aa901b1aa41fb541521800cc2a4774c162485 (patch) | |
tree | c2b19ce292c996b25166a9a123ae848f7dfcd8e4 /arch/x86/kvm/paging_tmpl.h | |
parent | 1d9dc7e000915b9607b480e34fcb4238b789fbb1 (diff) | |
download | lwn-e02aa901b1aa41fb541521800cc2a4774c162485.tar.gz lwn-e02aa901b1aa41fb541521800cc2a4774c162485.zip |
KVM: MMU: don't write-protect if have new mapping to unsync page
Two cases maybe happen in kvm_mmu_get_page() function:
- one case is, the goal sp is already in cache, if the sp is unsync,
we only need update it to assure this mapping is valid, but not
mark it sync and not write-protect sp->gfn since it not broke unsync
rule(one shadow page for a gfn)
- another case is, the goal sp not existed, we need create a new sp
for gfn, i.e, gfn (may)has another shadow page, to keep unsync rule,
we should sync(mark sync and write-protect) gfn's unsync shadow page.
After enabling multiple unsync shadows, we sync those shadow pages
only when the new sp not allow to become unsync(also for the unsyc
rule, the new rule is: allow all pte page become unsync)
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/paging_tmpl.h')
0 files changed, 0 insertions, 0 deletions