diff options
Diffstat (limited to 'arch/x86/kvm/paging_tmpl.h')
-rw-r--r-- | arch/x86/kvm/paging_tmpl.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 13d0c06b1bc8..68ee1b7fa89f 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -168,7 +168,7 @@ walk: | |||
168 | break; | 168 | break; |
169 | } | 169 | } |
170 | 170 | ||
171 | if (is_rsvd_bits_set(vcpu, pte, walker->level)) { | 171 | if (is_rsvd_bits_set(&vcpu->arch.mmu, pte, walker->level)) { |
172 | rsvd_fault = true; | 172 | rsvd_fault = true; |
173 | break; | 173 | break; |
174 | } | 174 | } |
@@ -327,6 +327,7 @@ static void FNAME(pte_prefetch)(struct kvm_vcpu *vcpu, struct guest_walker *gw, | |||
327 | u64 *sptep) | 327 | u64 *sptep) |
328 | { | 328 | { |
329 | struct kvm_mmu_page *sp; | 329 | struct kvm_mmu_page *sp; |
330 | struct kvm_mmu *mmu = &vcpu->arch.mmu; | ||
330 | pt_element_t *gptep = gw->prefetch_ptes; | 331 | pt_element_t *gptep = gw->prefetch_ptes; |
331 | u64 *spte; | 332 | u64 *spte; |
332 | int i; | 333 | int i; |
@@ -358,7 +359,7 @@ static void FNAME(pte_prefetch)(struct kvm_vcpu *vcpu, struct guest_walker *gw, | |||
358 | gpte = gptep[i]; | 359 | gpte = gptep[i]; |
359 | 360 | ||
360 | if (!is_present_gpte(gpte) || | 361 | if (!is_present_gpte(gpte) || |
361 | is_rsvd_bits_set(vcpu, gpte, PT_PAGE_TABLE_LEVEL)) { | 362 | is_rsvd_bits_set(mmu, gpte, PT_PAGE_TABLE_LEVEL)) { |
362 | if (!sp->unsync) | 363 | if (!sp->unsync) |
363 | __set_spte(spte, shadow_notrap_nonpresent_pte); | 364 | __set_spte(spte, shadow_notrap_nonpresent_pte); |
364 | continue; | 365 | continue; |
@@ -713,7 +714,7 @@ static int FNAME(sync_page)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, | |||
713 | return -EINVAL; | 714 | return -EINVAL; |
714 | 715 | ||
715 | gfn = gpte_to_gfn(gpte); | 716 | gfn = gpte_to_gfn(gpte); |
716 | if (is_rsvd_bits_set(vcpu, gpte, PT_PAGE_TABLE_LEVEL) | 717 | if (is_rsvd_bits_set(&vcpu->arch.mmu, gpte, PT_PAGE_TABLE_LEVEL) |
717 | || gfn != sp->gfns[i] || !is_present_gpte(gpte) | 718 | || gfn != sp->gfns[i] || !is_present_gpte(gpte) |
718 | || !(gpte & PT_ACCESSED_MASK)) { | 719 | || !(gpte & PT_ACCESSED_MASK)) { |
719 | u64 nonpresent; | 720 | u64 nonpresent; |