Skip to content

Commit

Permalink
KVM: MMU: set access bit for direct mapping
Browse files Browse the repository at this point in the history
Set access bit while setup up direct page table if it's nonpaing or npt enabled,
it's good for CPU's speculate access

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
  • Loading branch information
Xiao Guangrong authored and avikivity committed Oct 24, 2010
1 parent 20bd40d commit 33f91ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,8 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write,
__set_spte(iterator.sptep,
__pa(sp->spt)
| PT_PRESENT_MASK | PT_WRITABLE_MASK
| shadow_user_mask | shadow_x_mask);
| shadow_user_mask | shadow_x_mask
| shadow_accessed_mask);
}
}
return pt_write;
Expand Down

0 comments on commit 33f91ed

Please sign in to comment.