mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
KVM: MMU: remove mmu_is_invalid
Remove mmu_is_invalid and use is_invalid_pfn instead Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
03604b3114
commit
bd660776da
@ -2700,11 +2700,6 @@ static void transparent_hugepage_adjust(struct kvm_vcpu *vcpu,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool mmu_invalid_pfn(pfn_t pfn)
|
|
||||||
{
|
|
||||||
return unlikely(is_invalid_pfn(pfn));
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool handle_abnormal_pfn(struct kvm_vcpu *vcpu, gva_t gva, gfn_t gfn,
|
static bool handle_abnormal_pfn(struct kvm_vcpu *vcpu, gva_t gva, gfn_t gfn,
|
||||||
pfn_t pfn, unsigned access, int *ret_val)
|
pfn_t pfn, unsigned access, int *ret_val)
|
||||||
{
|
{
|
||||||
|
@ -340,7 +340,7 @@ static void FNAME(update_pte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
|
|||||||
pte_access = sp->role.access & gpte_access(vcpu, gpte);
|
pte_access = sp->role.access & gpte_access(vcpu, gpte);
|
||||||
protect_clean_gpte(&pte_access, gpte);
|
protect_clean_gpte(&pte_access, gpte);
|
||||||
pfn = gfn_to_pfn_atomic(vcpu->kvm, gpte_to_gfn(gpte));
|
pfn = gfn_to_pfn_atomic(vcpu->kvm, gpte_to_gfn(gpte));
|
||||||
if (mmu_invalid_pfn(pfn))
|
if (is_invalid_pfn(pfn))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -416,7 +416,7 @@ static void FNAME(pte_prefetch)(struct kvm_vcpu *vcpu, struct guest_walker *gw,
|
|||||||
gfn = gpte_to_gfn(gpte);
|
gfn = gpte_to_gfn(gpte);
|
||||||
pfn = pte_prefetch_gfn_to_pfn(vcpu, gfn,
|
pfn = pte_prefetch_gfn_to_pfn(vcpu, gfn,
|
||||||
pte_access & ACC_WRITE_MASK);
|
pte_access & ACC_WRITE_MASK);
|
||||||
if (mmu_invalid_pfn(pfn))
|
if (is_invalid_pfn(pfn))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
mmu_set_spte(vcpu, spte, sp->role.access, pte_access, 0, 0,
|
mmu_set_spte(vcpu, spte, sp->role.access, pte_access, 0, 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user