Re: [PATCH 02/22] kvm: mmu: Introduce tdp_iter
From: Paolo Bonzini
Date: Fri Sep 25 2020 - 20:05:00 EST
On 25/09/20 23:22, Ben Gardon wrote:
> EXPORT_SYMBOL_GPL(kvm_mmu_set_mmio_spte_mask);
>
> -static bool is_mmio_spte(u64 spte)
> +bool is_mmio_spte(u64 spte)
> {
> return (spte & SPTE_SPECIAL_MASK) == SPTE_MMIO_MASK;
> }
> @@ -623,7 +612,7 @@ static int is_nx(struct kvm_vcpu *vcpu)
> return vcpu->arch.efer & EFER_NX;
> }
>
> -static int is_shadow_present_pte(u64 pte)
> +int is_shadow_present_pte(u64 pte)
> {
> return (pte != 0) && !is_mmio_spte(pte);
> }
> @@ -633,7 +622,7 @@ static int is_large_pte(u64 pte)
> return pte & PT_PAGE_SIZE_MASK;
> }
>
> -static int is_last_spte(u64 pte, int level)
> +int is_last_spte(u64 pte, int level)
> {
> if (level == PG_LEVEL_4K)
> return 1;
> @@ -647,7 +636,7 @@ static bool is_executable_pte(u64 spte)
> return (spte & (shadow_x_mask | shadow_nx_mask)) == shadow_x_mask;
> }
>
> -static kvm_pfn_t spte_to_pfn(u64 pte)
> +kvm_pfn_t spte_to_pfn(u64 pte)
> {
> return (pte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT;
> }
Should these be inlines in mmu_internal.h instead?
Paolo