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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index 1fc4f9b321ee..211fef83be5d 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -327,6 +327,7 @@ static void FNAME(update_pte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *page,
327 int offset_in_pte) 327 int offset_in_pte)
328{ 328{
329 pt_element_t gpte; 329 pt_element_t gpte;
330 unsigned pte_access;
330 331
331 gpte = *(const pt_element_t *)pte; 332 gpte = *(const pt_element_t *)pte;
332 if (~gpte & (PT_PRESENT_MASK | PT_ACCESSED_MASK)) { 333 if (~gpte & (PT_PRESENT_MASK | PT_ACCESSED_MASK)) {
@@ -337,7 +338,8 @@ static void FNAME(update_pte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *page,
337 if (bytes < sizeof(pt_element_t)) 338 if (bytes < sizeof(pt_element_t))
338 return; 339 return;
339 pgprintk("%s: gpte %llx spte %p\n", __FUNCTION__, (u64)gpte, spte); 340 pgprintk("%s: gpte %llx spte %p\n", __FUNCTION__, (u64)gpte, spte);
340 FNAME(set_pte)(vcpu, gpte, spte, ACC_ALL, ACC_ALL, 341 pte_access = page->role.access & FNAME(gpte_access)(vcpu, gpte);
342 FNAME(set_pte)(vcpu, gpte, spte, page->role.access, pte_access,
341 0, 0, NULL, NULL, gpte_to_gfn(gpte)); 343 0, 0, NULL, NULL, gpte_to_gfn(gpte));
342} 344}
343 345