aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/paging_tmpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/paging_tmpl.h')
-rw-r--r--drivers/kvm/paging_tmpl.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index c06720385551..35f264f346d8 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -218,6 +218,7 @@ static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu,
218 FNAME(mark_pagetable_dirty)(vcpu->kvm, walker); 218 FNAME(mark_pagetable_dirty)(vcpu->kvm, walker);
219 } 219 }
220 220
221 *shadow_pte |= *gpte & PT_PTE_COPY_MASK;
221 *shadow_pte |= access_bits << PT_SHADOW_BITS_OFFSET; 222 *shadow_pte |= access_bits << PT_SHADOW_BITS_OFFSET;
222 if (!dirty) 223 if (!dirty)
223 access_bits &= ~PT_WRITABLE_MASK; 224 access_bits &= ~PT_WRITABLE_MASK;
@@ -288,7 +289,6 @@ static void FNAME(set_pte)(struct kvm_vcpu *vcpu, pt_element_t *gpte,
288 struct guest_walker *walker, gfn_t gfn) 289 struct guest_walker *walker, gfn_t gfn)
289{ 290{
290 access_bits &= *gpte; 291 access_bits &= *gpte;
291 *shadow_pte |= (*gpte & PT_PTE_COPY_MASK);
292 FNAME(set_pte_common)(vcpu, shadow_pte, *gpte & PT_BASE_ADDR_MASK, 292 FNAME(set_pte_common)(vcpu, shadow_pte, *gpte & PT_BASE_ADDR_MASK,
293 gpte, access_bits, user_fault, write_fault, 293 gpte, access_bits, user_fault, write_fault,
294 ptwrite, walker, gfn); 294 ptwrite, walker, gfn);
@@ -322,7 +322,6 @@ static void FNAME(set_pde)(struct kvm_vcpu *vcpu, pt_element_t *gpde,
322 if (PTTYPE == 32 && is_cpuid_PSE36()) 322 if (PTTYPE == 32 && is_cpuid_PSE36())
323 gaddr |= (*gpde & PT32_DIR_PSE36_MASK) << 323 gaddr |= (*gpde & PT32_DIR_PSE36_MASK) <<
324 (32 - PT32_DIR_PSE36_SHIFT); 324 (32 - PT32_DIR_PSE36_SHIFT);
325 *shadow_pte |= *gpde & PT_PTE_COPY_MASK;
326 FNAME(set_pte_common)(vcpu, shadow_pte, gaddr, 325 FNAME(set_pte_common)(vcpu, shadow_pte, gaddr,
327 gpde, access_bits, user_fault, write_fault, 326 gpde, access_bits, user_fault, write_fault,
328 ptwrite, walker, gfn); 327 ptwrite, walker, gfn);