diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/mmu.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index e956e9bed294..1cda1f332654 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1947,9 +1947,9 @@ static void link_shadow_page(u64 *sptep, struct kvm_mmu_page *sp) | |||
1947 | { | 1947 | { |
1948 | u64 spte; | 1948 | u64 spte; |
1949 | 1949 | ||
1950 | spte = __pa(sp->spt) | 1950 | spte = __pa(sp->spt) | PT_PRESENT_MASK | PT_WRITABLE_MASK | |
1951 | | PT_PRESENT_MASK | PT_ACCESSED_MASK | 1951 | shadow_user_mask | shadow_x_mask | shadow_accessed_mask; |
1952 | | PT_WRITABLE_MASK | PT_USER_MASK; | 1952 | |
1953 | mmu_spte_set(sptep, spte); | 1953 | mmu_spte_set(sptep, spte); |
1954 | } | 1954 | } |
1955 | 1955 | ||
@@ -2592,11 +2592,7 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write, | |||
2592 | iterator.level - 1, | 2592 | iterator.level - 1, |
2593 | 1, ACC_ALL, iterator.sptep); | 2593 | 1, ACC_ALL, iterator.sptep); |
2594 | 2594 | ||
2595 | mmu_spte_set(iterator.sptep, | 2595 | link_shadow_page(iterator.sptep, sp); |
2596 | __pa(sp->spt) | ||
2597 | | PT_PRESENT_MASK | PT_WRITABLE_MASK | ||
2598 | | shadow_user_mask | shadow_x_mask | ||
2599 | | shadow_accessed_mask); | ||
2600 | } | 2596 | } |
2601 | } | 2597 | } |
2602 | return emulate; | 2598 | return emulate; |