All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoffer Dall <christoffer.dall@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: kvm@vger.kernel.org, marc.zyngier@arm.com,
	catalin.marinas@arm.com, will.deacon@arm.com,
	linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 12/17] kvm-arm: Add explicit hyp page table modifiers
Date: Thu, 14 Apr 2016 17:06:52 +0200	[thread overview]
Message-ID: <20160414150652.GO30804@cbox> (raw)
In-Reply-To: <1460640065-27658-13-git-send-email-suzuki.poulose@arm.com>

On Thu, Apr 14, 2016 at 02:21:00PM +0100, Suzuki K Poulose wrote:
> We have common routines to modify hyp and stage2 page tables
> based on the 'kvm' parameter. For a smoother transition to
> using separate routines for each, duplicate the routines
> and modify the copy to work on hyp.
> 
> Marks the forked routines with _hyp_ and gets rid of the
> kvm parameter which is no longer needed and is NULL for hyp.
> Also, gets rid of calls to kvm_tlb_flush_by_vmid_ipa() calls
> from the hyp versions. Uses explicit host page table accessors
> instead of the kvm_* page table helpers.
> 
> Suggested-by: Christoffer Dall <christoffer.dall@linaro.org>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
> Changes since V1:
>  - Remove flush_dcache for !device_pfns in unmap_hyp_ptes()
>  - Remove huge pmd/pud checks in unmap_hyp_p.ds, since we don't
>    use huge mappings
>  - Add a comment in unmap_hyp_range() on why we don't invalidate
>    TLBs.
> ---
>  arch/arm/kvm/mmu.c |  104 +++++++++++++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 99 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
> index f93f717..af526f6 100644
> --- a/arch/arm/kvm/mmu.c
> +++ b/arch/arm/kvm/mmu.c
> @@ -388,6 +388,100 @@ static void stage2_flush_vm(struct kvm *kvm)
>  	srcu_read_unlock(&kvm->srcu, idx);
>  }
>  
> +static void clear_hyp_pgd_entry(pgd_t *pgd)
> +{
> +	pud_t *pud_table __maybe_unused = pud_offset(pgd, 0UL);
> +	pgd_clear(pgd);
> +	pud_free(NULL, pud_table);
> +	put_page(virt_to_page(pgd));
> +}
> +
> +static void clear_hyp_pud_entry(pud_t *pud)
> +{
> +	pmd_t *pmd_table __maybe_unused = pmd_offset(pud, 0);
> +	VM_BUG_ON(pud_huge(*pud));
> +	pud_clear(pud);
> +	pmd_free(NULL, pmd_table);
> +	put_page(virt_to_page(pud));
> +}
> +
> +static void clear_hyp_pmd_entry(pmd_t *pmd)
> +{
> +	pte_t *pte_table = pte_offset_kernel(pmd, 0);
> +	VM_BUG_ON(pmd_thp_or_huge(*pmd));
> +	pmd_clear(pmd);
> +	pte_free_kernel(NULL, pte_table);
> +	put_page(virt_to_page(pmd));
> +}
> +
> +static void unmap_hyp_ptes(pmd_t *pmd, phys_addr_t addr, phys_addr_t end)
> +{
> +	pte_t *pte, *start_pte;
> +
> +	start_pte = pte = pte_offset_kernel(pmd, addr);
> +	do {
> +		if (!pte_none(*pte)) {
> +			kvm_set_pte(pte, __pte(0));
> +			put_page(virt_to_page(pte));
> +		}
> +	} while (pte++, addr += PAGE_SIZE, addr != end);
> +
> +	if (hyp_pte_table_empty(start_pte))
> +		clear_hyp_pmd_entry(pmd);
> +}
> +
> +static void unmap_hyp_pmds(pud_t *pud, phys_addr_t addr, phys_addr_t end)
> +{
> +	phys_addr_t next;
> +	pmd_t *pmd, *start_pmd;
> +
> +	start_pmd = pmd = pmd_offset(pud, addr);
> +	do {
> +		next = pmd_addr_end(addr, end);
> +		/* Hyp doesn't use huge pmds */
> +		if (!pmd_none(*pmd))
> +			unmap_hyp_ptes(pmd, addr, next);
> +	} while (pmd++, addr = next, addr != end);
> +
> +	if (hyp_pmd_table_empty(start_pmd))
> +		clear_hyp_pud_entry(pud);
> +}
> +
> +static void unmap_hyp_puds(pgd_t *pgd, phys_addr_t addr, phys_addr_t end)
> +{
> +	phys_addr_t next;
> +	pud_t *pud, *start_pud;
> +
> +	start_pud = pud = pud_offset(pgd, addr);
> +	do {
> +		next = pud_addr_end(addr, end);
> +		/* Hyp doesn't use huge puds */
> +		if (!pud_none(*pud))
> +			unmap_hyp_pmds(pud, addr, next);
> +	} while (pud++, addr = next, addr != end);
> +
> +	if (hyp_pud_table_empty(start_pud))
> +		clear_hyp_pgd_entry(pgd);
> +}
> +
> +static void unmap_hyp_range(pgd_t *pgdp, phys_addr_t start, u64 size)
> +{
> +	pgd_t *pgd;
> +	phys_addr_t addr = start, end = start + size;
> +	phys_addr_t next;
> +
> +	/*
> +	 * We don't unmap anything from HYP, except at the hyp tear down.
> +	 * Hence, we don't have to invalidate the TLBs here.
> +	 */
> +	pgd = pgdp + pgd_index(addr);
> +	do {
> +		next = pgd_addr_end(addr, end);
> +		if (!pgd_none(*pgd))
> +			unmap_hyp_puds(pgd, addr, next);
> +	} while (pgd++, addr = next, addr != end);
> +}
> +
>  /**
>   * free_boot_hyp_pgd - free HYP boot page tables
>   *
> @@ -398,14 +492,14 @@ void free_boot_hyp_pgd(void)
>  	mutex_lock(&kvm_hyp_pgd_mutex);
>  
>  	if (boot_hyp_pgd) {
> -		unmap_range(NULL, boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE);
> -		unmap_range(NULL, boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
> +		unmap_hyp_range(boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE);
> +		unmap_hyp_range(boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
>  		free_pages((unsigned long)boot_hyp_pgd, hyp_pgd_order);
>  		boot_hyp_pgd = NULL;
>  	}
>  
>  	if (hyp_pgd)
> -		unmap_range(NULL, hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
> +		unmap_hyp_range(hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
>  
>  	mutex_unlock(&kvm_hyp_pgd_mutex);
>  }
> @@ -430,9 +524,9 @@ void free_hyp_pgds(void)
>  
>  	if (hyp_pgd) {
>  		for (addr = PAGE_OFFSET; virt_addr_valid(addr); addr += PGDIR_SIZE)
> -			unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
> +			unmap_hyp_range(hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
>  		for (addr = VMALLOC_START; is_vmalloc_addr((void*)addr); addr += PGDIR_SIZE)
> -			unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
> +			unmap_hyp_range(hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
>  
>  		free_pages((unsigned long)hyp_pgd, hyp_pgd_order);
>  		hyp_pgd = NULL;
> -- 
> 1.7.9.5
> 

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>

WARNING: multiple messages have this Message-ID (diff)
From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 12/17] kvm-arm: Add explicit hyp page table modifiers
Date: Thu, 14 Apr 2016 17:06:52 +0200	[thread overview]
Message-ID: <20160414150652.GO30804@cbox> (raw)
In-Reply-To: <1460640065-27658-13-git-send-email-suzuki.poulose@arm.com>

On Thu, Apr 14, 2016 at 02:21:00PM +0100, Suzuki K Poulose wrote:
> We have common routines to modify hyp and stage2 page tables
> based on the 'kvm' parameter. For a smoother transition to
> using separate routines for each, duplicate the routines
> and modify the copy to work on hyp.
> 
> Marks the forked routines with _hyp_ and gets rid of the
> kvm parameter which is no longer needed and is NULL for hyp.
> Also, gets rid of calls to kvm_tlb_flush_by_vmid_ipa() calls
> from the hyp versions. Uses explicit host page table accessors
> instead of the kvm_* page table helpers.
> 
> Suggested-by: Christoffer Dall <christoffer.dall@linaro.org>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
> Changes since V1:
>  - Remove flush_dcache for !device_pfns in unmap_hyp_ptes()
>  - Remove huge pmd/pud checks in unmap_hyp_p.ds, since we don't
>    use huge mappings
>  - Add a comment in unmap_hyp_range() on why we don't invalidate
>    TLBs.
> ---
>  arch/arm/kvm/mmu.c |  104 +++++++++++++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 99 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
> index f93f717..af526f6 100644
> --- a/arch/arm/kvm/mmu.c
> +++ b/arch/arm/kvm/mmu.c
> @@ -388,6 +388,100 @@ static void stage2_flush_vm(struct kvm *kvm)
>  	srcu_read_unlock(&kvm->srcu, idx);
>  }
>  
> +static void clear_hyp_pgd_entry(pgd_t *pgd)
> +{
> +	pud_t *pud_table __maybe_unused = pud_offset(pgd, 0UL);
> +	pgd_clear(pgd);
> +	pud_free(NULL, pud_table);
> +	put_page(virt_to_page(pgd));
> +}
> +
> +static void clear_hyp_pud_entry(pud_t *pud)
> +{
> +	pmd_t *pmd_table __maybe_unused = pmd_offset(pud, 0);
> +	VM_BUG_ON(pud_huge(*pud));
> +	pud_clear(pud);
> +	pmd_free(NULL, pmd_table);
> +	put_page(virt_to_page(pud));
> +}
> +
> +static void clear_hyp_pmd_entry(pmd_t *pmd)
> +{
> +	pte_t *pte_table = pte_offset_kernel(pmd, 0);
> +	VM_BUG_ON(pmd_thp_or_huge(*pmd));
> +	pmd_clear(pmd);
> +	pte_free_kernel(NULL, pte_table);
> +	put_page(virt_to_page(pmd));
> +}
> +
> +static void unmap_hyp_ptes(pmd_t *pmd, phys_addr_t addr, phys_addr_t end)
> +{
> +	pte_t *pte, *start_pte;
> +
> +	start_pte = pte = pte_offset_kernel(pmd, addr);
> +	do {
> +		if (!pte_none(*pte)) {
> +			kvm_set_pte(pte, __pte(0));
> +			put_page(virt_to_page(pte));
> +		}
> +	} while (pte++, addr += PAGE_SIZE, addr != end);
> +
> +	if (hyp_pte_table_empty(start_pte))
> +		clear_hyp_pmd_entry(pmd);
> +}
> +
> +static void unmap_hyp_pmds(pud_t *pud, phys_addr_t addr, phys_addr_t end)
> +{
> +	phys_addr_t next;
> +	pmd_t *pmd, *start_pmd;
> +
> +	start_pmd = pmd = pmd_offset(pud, addr);
> +	do {
> +		next = pmd_addr_end(addr, end);
> +		/* Hyp doesn't use huge pmds */
> +		if (!pmd_none(*pmd))
> +			unmap_hyp_ptes(pmd, addr, next);
> +	} while (pmd++, addr = next, addr != end);
> +
> +	if (hyp_pmd_table_empty(start_pmd))
> +		clear_hyp_pud_entry(pud);
> +}
> +
> +static void unmap_hyp_puds(pgd_t *pgd, phys_addr_t addr, phys_addr_t end)
> +{
> +	phys_addr_t next;
> +	pud_t *pud, *start_pud;
> +
> +	start_pud = pud = pud_offset(pgd, addr);
> +	do {
> +		next = pud_addr_end(addr, end);
> +		/* Hyp doesn't use huge puds */
> +		if (!pud_none(*pud))
> +			unmap_hyp_pmds(pud, addr, next);
> +	} while (pud++, addr = next, addr != end);
> +
> +	if (hyp_pud_table_empty(start_pud))
> +		clear_hyp_pgd_entry(pgd);
> +}
> +
> +static void unmap_hyp_range(pgd_t *pgdp, phys_addr_t start, u64 size)
> +{
> +	pgd_t *pgd;
> +	phys_addr_t addr = start, end = start + size;
> +	phys_addr_t next;
> +
> +	/*
> +	 * We don't unmap anything from HYP, except at the hyp tear down.
> +	 * Hence, we don't have to invalidate the TLBs here.
> +	 */
> +	pgd = pgdp + pgd_index(addr);
> +	do {
> +		next = pgd_addr_end(addr, end);
> +		if (!pgd_none(*pgd))
> +			unmap_hyp_puds(pgd, addr, next);
> +	} while (pgd++, addr = next, addr != end);
> +}
> +
>  /**
>   * free_boot_hyp_pgd - free HYP boot page tables
>   *
> @@ -398,14 +492,14 @@ void free_boot_hyp_pgd(void)
>  	mutex_lock(&kvm_hyp_pgd_mutex);
>  
>  	if (boot_hyp_pgd) {
> -		unmap_range(NULL, boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE);
> -		unmap_range(NULL, boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
> +		unmap_hyp_range(boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE);
> +		unmap_hyp_range(boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
>  		free_pages((unsigned long)boot_hyp_pgd, hyp_pgd_order);
>  		boot_hyp_pgd = NULL;
>  	}
>  
>  	if (hyp_pgd)
> -		unmap_range(NULL, hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
> +		unmap_hyp_range(hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
>  
>  	mutex_unlock(&kvm_hyp_pgd_mutex);
>  }
> @@ -430,9 +524,9 @@ void free_hyp_pgds(void)
>  
>  	if (hyp_pgd) {
>  		for (addr = PAGE_OFFSET; virt_addr_valid(addr); addr += PGDIR_SIZE)
> -			unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
> +			unmap_hyp_range(hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
>  		for (addr = VMALLOC_START; is_vmalloc_addr((void*)addr); addr += PGDIR_SIZE)
> -			unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
> +			unmap_hyp_range(hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
>  
>  		free_pages((unsigned long)hyp_pgd, hyp_pgd_order);
>  		hyp_pgd = NULL;
> -- 
> 1.7.9.5
> 

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>

WARNING: multiple messages have this Message-ID (diff)
From: Christoffer Dall <christoffer.dall@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
	marc.zyngier@arm.com, mark.rutland@arm.com, will.deacon@arm.com,
	catalin.marinas@arm.com, linux-kernel@vger.kernel.org,
	kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH v2 12/17] kvm-arm: Add explicit hyp page table modifiers
Date: Thu, 14 Apr 2016 17:06:52 +0200	[thread overview]
Message-ID: <20160414150652.GO30804@cbox> (raw)
In-Reply-To: <1460640065-27658-13-git-send-email-suzuki.poulose@arm.com>

On Thu, Apr 14, 2016 at 02:21:00PM +0100, Suzuki K Poulose wrote:
> We have common routines to modify hyp and stage2 page tables
> based on the 'kvm' parameter. For a smoother transition to
> using separate routines for each, duplicate the routines
> and modify the copy to work on hyp.
> 
> Marks the forked routines with _hyp_ and gets rid of the
> kvm parameter which is no longer needed and is NULL for hyp.
> Also, gets rid of calls to kvm_tlb_flush_by_vmid_ipa() calls
> from the hyp versions. Uses explicit host page table accessors
> instead of the kvm_* page table helpers.
> 
> Suggested-by: Christoffer Dall <christoffer.dall@linaro.org>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
> Changes since V1:
>  - Remove flush_dcache for !device_pfns in unmap_hyp_ptes()
>  - Remove huge pmd/pud checks in unmap_hyp_p.ds, since we don't
>    use huge mappings
>  - Add a comment in unmap_hyp_range() on why we don't invalidate
>    TLBs.
> ---
>  arch/arm/kvm/mmu.c |  104 +++++++++++++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 99 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
> index f93f717..af526f6 100644
> --- a/arch/arm/kvm/mmu.c
> +++ b/arch/arm/kvm/mmu.c
> @@ -388,6 +388,100 @@ static void stage2_flush_vm(struct kvm *kvm)
>  	srcu_read_unlock(&kvm->srcu, idx);
>  }
>  
> +static void clear_hyp_pgd_entry(pgd_t *pgd)
> +{
> +	pud_t *pud_table __maybe_unused = pud_offset(pgd, 0UL);
> +	pgd_clear(pgd);
> +	pud_free(NULL, pud_table);
> +	put_page(virt_to_page(pgd));
> +}
> +
> +static void clear_hyp_pud_entry(pud_t *pud)
> +{
> +	pmd_t *pmd_table __maybe_unused = pmd_offset(pud, 0);
> +	VM_BUG_ON(pud_huge(*pud));
> +	pud_clear(pud);
> +	pmd_free(NULL, pmd_table);
> +	put_page(virt_to_page(pud));
> +}
> +
> +static void clear_hyp_pmd_entry(pmd_t *pmd)
> +{
> +	pte_t *pte_table = pte_offset_kernel(pmd, 0);
> +	VM_BUG_ON(pmd_thp_or_huge(*pmd));
> +	pmd_clear(pmd);
> +	pte_free_kernel(NULL, pte_table);
> +	put_page(virt_to_page(pmd));
> +}
> +
> +static void unmap_hyp_ptes(pmd_t *pmd, phys_addr_t addr, phys_addr_t end)
> +{
> +	pte_t *pte, *start_pte;
> +
> +	start_pte = pte = pte_offset_kernel(pmd, addr);
> +	do {
> +		if (!pte_none(*pte)) {
> +			kvm_set_pte(pte, __pte(0));
> +			put_page(virt_to_page(pte));
> +		}
> +	} while (pte++, addr += PAGE_SIZE, addr != end);
> +
> +	if (hyp_pte_table_empty(start_pte))
> +		clear_hyp_pmd_entry(pmd);
> +}
> +
> +static void unmap_hyp_pmds(pud_t *pud, phys_addr_t addr, phys_addr_t end)
> +{
> +	phys_addr_t next;
> +	pmd_t *pmd, *start_pmd;
> +
> +	start_pmd = pmd = pmd_offset(pud, addr);
> +	do {
> +		next = pmd_addr_end(addr, end);
> +		/* Hyp doesn't use huge pmds */
> +		if (!pmd_none(*pmd))
> +			unmap_hyp_ptes(pmd, addr, next);
> +	} while (pmd++, addr = next, addr != end);
> +
> +	if (hyp_pmd_table_empty(start_pmd))
> +		clear_hyp_pud_entry(pud);
> +}
> +
> +static void unmap_hyp_puds(pgd_t *pgd, phys_addr_t addr, phys_addr_t end)
> +{
> +	phys_addr_t next;
> +	pud_t *pud, *start_pud;
> +
> +	start_pud = pud = pud_offset(pgd, addr);
> +	do {
> +		next = pud_addr_end(addr, end);
> +		/* Hyp doesn't use huge puds */
> +		if (!pud_none(*pud))
> +			unmap_hyp_pmds(pud, addr, next);
> +	} while (pud++, addr = next, addr != end);
> +
> +	if (hyp_pud_table_empty(start_pud))
> +		clear_hyp_pgd_entry(pgd);
> +}
> +
> +static void unmap_hyp_range(pgd_t *pgdp, phys_addr_t start, u64 size)
> +{
> +	pgd_t *pgd;
> +	phys_addr_t addr = start, end = start + size;
> +	phys_addr_t next;
> +
> +	/*
> +	 * We don't unmap anything from HYP, except at the hyp tear down.
> +	 * Hence, we don't have to invalidate the TLBs here.
> +	 */
> +	pgd = pgdp + pgd_index(addr);
> +	do {
> +		next = pgd_addr_end(addr, end);
> +		if (!pgd_none(*pgd))
> +			unmap_hyp_puds(pgd, addr, next);
> +	} while (pgd++, addr = next, addr != end);
> +}
> +
>  /**
>   * free_boot_hyp_pgd - free HYP boot page tables
>   *
> @@ -398,14 +492,14 @@ void free_boot_hyp_pgd(void)
>  	mutex_lock(&kvm_hyp_pgd_mutex);
>  
>  	if (boot_hyp_pgd) {
> -		unmap_range(NULL, boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE);
> -		unmap_range(NULL, boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
> +		unmap_hyp_range(boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE);
> +		unmap_hyp_range(boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
>  		free_pages((unsigned long)boot_hyp_pgd, hyp_pgd_order);
>  		boot_hyp_pgd = NULL;
>  	}
>  
>  	if (hyp_pgd)
> -		unmap_range(NULL, hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
> +		unmap_hyp_range(hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
>  
>  	mutex_unlock(&kvm_hyp_pgd_mutex);
>  }
> @@ -430,9 +524,9 @@ void free_hyp_pgds(void)
>  
>  	if (hyp_pgd) {
>  		for (addr = PAGE_OFFSET; virt_addr_valid(addr); addr += PGDIR_SIZE)
> -			unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
> +			unmap_hyp_range(hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
>  		for (addr = VMALLOC_START; is_vmalloc_addr((void*)addr); addr += PGDIR_SIZE)
> -			unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
> +			unmap_hyp_range(hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
>  
>  		free_pages((unsigned long)hyp_pgd, hyp_pgd_order);
>  		hyp_pgd = NULL;
> -- 
> 1.7.9.5
> 

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>

  reply	other threads:[~2016-04-14 15:04 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 13:20 [PATCH v2 00/17] kvm-arm: Add stage2 page table walker Suzuki K Poulose
2016-04-14 13:20 ` Suzuki K Poulose
2016-04-14 13:20 ` Suzuki K Poulose
2016-04-14 13:20 ` [PATCH v2 01/17] arm64: Reuse TCR field definitions for EL1 and EL2 Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 14:11   ` Marc Zyngier
2016-04-14 14:11     ` Marc Zyngier
2016-04-14 14:11     ` Marc Zyngier
2016-04-15 15:15   ` Will Deacon
2016-04-15 15:15     ` Will Deacon
2016-04-15 15:15     ` Will Deacon
2016-04-14 13:20 ` [PATCH v2 02/17] arm64: Cleanup VTCR_EL2 and VTTBR field values Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 14:12   ` Marc Zyngier
2016-04-14 14:12     ` Marc Zyngier
2016-04-14 14:12     ` Marc Zyngier
2016-04-14 13:20 ` [PATCH v2 03/17] kvm arm: Move fake PGD handling to arch specific files Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20 ` [PATCH v2 04/17] arm64: Introduce pmd_thp_or_huge Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 14:14   ` Marc Zyngier
2016-04-14 14:14     ` Marc Zyngier
2016-04-14 14:14     ` Marc Zyngier
2016-04-15 15:17   ` Will Deacon
2016-04-15 15:17     ` Will Deacon
2016-04-15 15:17     ` Will Deacon
2016-04-14 13:20 ` [PATCH v2 05/17] kvm-arm: Replace kvm_pmd_huge with pmd_thp_or_huge Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 14:15   ` Marc Zyngier
2016-04-14 14:15     ` Marc Zyngier
2016-04-14 13:20 ` [PATCH v2 06/17] kvm-arm: Remove kvm_pud_huge() Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 14:16   ` Marc Zyngier
2016-04-14 14:16     ` Marc Zyngier
2016-04-14 14:16     ` Marc Zyngier
2016-04-14 13:20 ` [PATCH v2 07/17] kvm-arm: arm32: Introduce stage2 page table helpers Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 14:22   ` Marc Zyngier
2016-04-14 14:22     ` Marc Zyngier
2016-04-14 14:22     ` Marc Zyngier
2016-04-14 13:20 ` [PATCH v2 08/17] kvm-arm: arm: Introduce hyp page table empty checks Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 14:23   ` Marc Zyngier
2016-04-14 14:23     ` Marc Zyngier
2016-04-14 14:23     ` Marc Zyngier
2016-04-14 13:20 ` [PATCH v2 09/17] kvm-arm: arm64: Introduce stage2 page table helpers Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 14:31   ` Marc Zyngier
2016-04-14 14:31     ` Marc Zyngier
2016-04-14 14:31     ` Marc Zyngier
2016-04-14 13:20 ` [PATCH v2 10/17] kvm-arm: arm64: Introduce hyp page table empty checks Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 14:45   ` Marc Zyngier
2016-04-14 14:45     ` Marc Zyngier
2016-04-14 14:45     ` Marc Zyngier
2016-04-14 13:20 ` [PATCH v2 11/17] kvm-arm: Use explicit stage2 helper routines Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:20   ` Suzuki K Poulose
2016-04-14 13:21 ` [PATCH v2 12/17] kvm-arm: Add explicit hyp page table modifiers Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 15:06   ` Christoffer Dall [this message]
2016-04-14 15:06     ` Christoffer Dall
2016-04-14 15:06     ` Christoffer Dall
2016-04-14 13:21 ` [PATCH v2 13/17] kvm-arm: Add stage2 " Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 13:21 ` [PATCH v2 14/17] kvm-arm: Cleanup kvm_* wrappers Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 13:21 ` [PATCH v2 15/17] kvm: arm64: Get rid of fake page table levels Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 15:08   ` Christoffer Dall
2016-04-14 15:08     ` Christoffer Dall
2016-04-14 15:08     ` Christoffer Dall
2016-04-14 13:21 ` [PATCH v2 16/17] kvm-arm: Cleanup stage2 pgd handling Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 13:21 ` [PATCH v2 17/17] arm64: kvm: Add support for 16K pages Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 13:21   ` Suzuki K Poulose
2016-04-14 13:29 ` [PATCH v2 00/17] kvm-arm: Add stage2 page table walker Suzuki K Poulose
2016-04-14 13:29   ` Suzuki K Poulose
2016-04-14 13:29   ` Suzuki K Poulose
2016-04-14 16:03   ` Christoffer Dall
2016-04-14 16:03     ` Christoffer Dall
2016-04-14 16:03     ` Christoffer Dall
2016-04-14 16:10     ` Marc Zyngier
2016-04-14 16:10       ` Marc Zyngier
2016-04-14 16:10       ` Marc Zyngier
2016-04-14 16:11     ` Suzuki K Poulose
2016-04-14 16:11       ` Suzuki K Poulose
2016-04-14 16:11       ` Suzuki K Poulose
2016-04-14 16:41       ` Christoffer Dall
2016-04-14 16:41         ` Christoffer Dall
2016-04-14 16:41         ` Christoffer Dall
2016-04-14 16:51         ` Suzuki K Poulose
2016-04-14 16:51           ` Suzuki K Poulose
2016-04-14 16:51           ` Suzuki K Poulose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160414150652.GO30804@cbox \
    --to=christoffer.dall@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.