linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoffer Dall <christoffer.dall@linaro.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-nvdimm@lists.01.org, Dave Hansen <dave@sr71.net>,
	Russell King <linux@arm.linux.org.uk>,
	linux-mm@kvack.org, Gleb Natapov <gleb@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Paul Mackerras <paulus@samba.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	ross.zwisler@linux.intel.com, hch@lst.de,
	Alexander Graf <agraf@suse.com>
Subject: Re: [PATCH v2 11/20] kvm: rename pfn_t to kvm_pfn_t
Date: Sat, 10 Oct 2015 17:35:11 +0200	[thread overview]
Message-ID: <20151010153511.GG29128@cbox> (raw)
In-Reply-To: <20151010005622.17221.44373.stgit@dwillia2-desk3.jf.intel.com>

On Fri, Oct 09, 2015 at 08:56:22PM -0400, Dan Williams wrote:
> The core has developed a need for a "pfn_t" type [1].  Move the existing
> pfn_t in KVM to kvm_pfn_t [2].
> 
> [1]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002199.html
> [2]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002218.html
> 
> Cc: Dave Hansen <dave@sr71.net>
> Cc: Gleb Natapov <gleb@kernel.org>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Christoffer Dall <christoffer.dall@linaro.org>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Alexander Graf <agraf@suse.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  arch/arm/include/asm/kvm_mmu.h        |    5 ++--
>  arch/arm/kvm/mmu.c                    |   10 ++++---
>  arch/arm64/include/asm/kvm_mmu.h      |    3 +-
>  arch/mips/include/asm/kvm_host.h      |    6 ++--
>  arch/mips/kvm/emulate.c               |    2 +
>  arch/mips/kvm/tlb.c                   |   14 +++++-----
>  arch/powerpc/include/asm/kvm_book3s.h |    4 +--
>  arch/powerpc/include/asm/kvm_ppc.h    |    2 +
>  arch/powerpc/kvm/book3s.c             |    6 ++--
>  arch/powerpc/kvm/book3s_32_mmu_host.c |    2 +
>  arch/powerpc/kvm/book3s_64_mmu_host.c |    2 +
>  arch/powerpc/kvm/e500.h               |    2 +
>  arch/powerpc/kvm/e500_mmu_host.c      |    8 +++---
>  arch/powerpc/kvm/trace_pr.h           |    2 +
>  arch/x86/kvm/iommu.c                  |   11 ++++----
>  arch/x86/kvm/mmu.c                    |   37 +++++++++++++-------------
>  arch/x86/kvm/mmu_audit.c              |    2 +
>  arch/x86/kvm/paging_tmpl.h            |    6 ++--
>  arch/x86/kvm/vmx.c                    |    2 +
>  arch/x86/kvm/x86.c                    |    2 +
>  include/linux/kvm_host.h              |   37 +++++++++++++-------------
>  include/linux/kvm_types.h             |    2 +
>  virt/kvm/kvm_main.c                   |   47 +++++++++++++++++----------------
>  23 files changed, 110 insertions(+), 104 deletions(-)
> 
> diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h
> index 405aa1883307..8ebd282dfc2b 100644
> --- a/arch/arm/include/asm/kvm_mmu.h
> +++ b/arch/arm/include/asm/kvm_mmu.h
> @@ -182,7 +182,8 @@ static inline bool vcpu_has_cache_enabled(struct kvm_vcpu *vcpu)
>  	return (vcpu->arch.cp15[c1_SCTLR] & 0b101) == 0b101;
>  }
>  
> -static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu, pfn_t pfn,
> +static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu,
> +					       kvm_pfn_t pfn,
>  					       unsigned long size,
>  					       bool ipa_uncached)
>  {
> @@ -246,7 +247,7 @@ static inline void __kvm_flush_dcache_pte(pte_t pte)
>  static inline void __kvm_flush_dcache_pmd(pmd_t pmd)
>  {
>  	unsigned long size = PMD_SIZE;
> -	pfn_t pfn = pmd_pfn(pmd);
> +	kvm_pfn_t pfn = pmd_pfn(pmd);
>  
>  	while (size) {
>  		void *va = kmap_atomic_pfn(pfn);
> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
> index 6984342da13d..e2dcbfdc4a8c 100644
> --- a/arch/arm/kvm/mmu.c
> +++ b/arch/arm/kvm/mmu.c
> @@ -988,9 +988,9 @@ out:
>  	return ret;
>  }
>  
> -static bool transparent_hugepage_adjust(pfn_t *pfnp, phys_addr_t *ipap)
> +static bool transparent_hugepage_adjust(kvm_pfn_t *pfnp, phys_addr_t *ipap)
>  {
> -	pfn_t pfn = *pfnp;
> +	kvm_pfn_t pfn = *pfnp;
>  	gfn_t gfn = *ipap >> PAGE_SHIFT;
>  
>  	if (PageTransCompound(pfn_to_page(pfn))) {
> @@ -1202,7 +1202,7 @@ void kvm_arch_mmu_enable_log_dirty_pt_masked(struct kvm *kvm,
>  	kvm_mmu_write_protect_pt_masked(kvm, slot, gfn_offset, mask);
>  }
>  
> -static void coherent_cache_guest_page(struct kvm_vcpu *vcpu, pfn_t pfn,
> +static void coherent_cache_guest_page(struct kvm_vcpu *vcpu, kvm_pfn_t pfn,
>  				      unsigned long size, bool uncached)
>  {
>  	__coherent_cache_guest_page(vcpu, pfn, size, uncached);
> @@ -1219,7 +1219,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>  	struct kvm *kvm = vcpu->kvm;
>  	struct kvm_mmu_memory_cache *memcache = &vcpu->arch.mmu_page_cache;
>  	struct vm_area_struct *vma;
> -	pfn_t pfn;
> +	kvm_pfn_t pfn;
>  	pgprot_t mem_type = PAGE_S2;
>  	bool fault_ipa_uncached;
>  	bool logging_active = memslot_is_logging(memslot);
> @@ -1347,7 +1347,7 @@ static void handle_access_fault(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa)
>  {
>  	pmd_t *pmd;
>  	pte_t *pte;
> -	pfn_t pfn;
> +	kvm_pfn_t pfn;
>  	bool pfn_valid = false;
>  
>  	trace_kvm_access_fault(fault_ipa);
> diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h
> index 61505676d085..385fc8cef82d 100644
> --- a/arch/arm64/include/asm/kvm_mmu.h
> +++ b/arch/arm64/include/asm/kvm_mmu.h
> @@ -230,7 +230,8 @@ static inline bool vcpu_has_cache_enabled(struct kvm_vcpu *vcpu)
>  	return (vcpu_sys_reg(vcpu, SCTLR_EL1) & 0b101) == 0b101;
>  }
>  
> -static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu, pfn_t pfn,
> +static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu,
> +					       kvm_pfn_t pfn,
>  					       unsigned long size,
>  					       bool ipa_uncached)
>  {
[...]

For the arm/arm64 part:
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-10-10 15:34 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-10  0:55 [PATCH v2 00/20] get_user_pages() for dax mappings Dan Williams
2015-10-10  0:55 ` [PATCH v2 01/20] block: generic request_queue reference counting Dan Williams
2015-10-11 12:59   ` Christoph Hellwig
2015-10-13  0:09     ` Dan Williams
2015-10-10  0:55 ` [PATCH v2 02/20] dax: increase granularity of dax_clear_blocks() operations Dan Williams
2015-10-10  0:55 ` [PATCH v2 03/20] block, dax: fix lifetime of in-kernel dax mappings with dax_map_atomic() Dan Williams
2015-10-10  0:55 ` [PATCH v2 04/20] mm: introduce __get_dev_pagemap() Dan Williams
2015-10-10  0:55 ` [PATCH v2 05/20] x86, mm: introduce vmem_altmap to augment vmemmap_populate() Dan Williams
2015-10-19 22:53   ` Williams, Dan J
2015-10-10  0:55 ` [PATCH v2 06/20] libnvdimm, pfn, pmem: allocate memmap array in persistent memory Dan Williams
2015-10-10  0:56 ` [PATCH v2 07/20] avr32: convert to asm-generic/memory_model.h Dan Williams
2015-10-10  0:56 ` [PATCH v2 08/20] hugetlb: fix compile error on tile Dan Williams
2015-10-10  0:56 ` [PATCH v2 09/20] frv: fix compiler warning from definition of __pmd() Dan Williams
2015-10-10  0:56 ` [PATCH v2 10/20] um: kill pfn_t Dan Williams
2015-10-10  0:56 ` [PATCH v2 11/20] kvm: rename pfn_t to kvm_pfn_t Dan Williams
2015-10-10 15:35   ` Christoffer Dall [this message]
2015-10-10 20:35   ` Paolo Bonzini
2015-10-10 20:57     ` Dan Williams
2015-10-12 12:51       ` Paolo Bonzini
2015-10-12 16:16         ` Dan Williams
2015-10-10  0:56 ` [PATCH v2 12/20] mips: fix PAGE_MASK definition Dan Williams
2015-10-10  0:56 ` [PATCH v2 13/20] mm, dax, pmem: introduce pfn_t Dan Williams
2015-10-10  0:56 ` [PATCH v2 14/20] mm, dax, gpu: convert vm_insert_mixed to pfn_t, introduce _PAGE_DEVMAP Dan Williams
2015-10-10  0:56 ` [PATCH v2 15/20] mm, dax: convert vmf_insert_pfn_pmd() to pfn_t Dan Williams
2015-10-10  0:56 ` [PATCH v2 16/20] list: introduce list_poison() and LIST_POISON3 Dan Williams
2015-10-10  0:56 ` [PATCH v2 17/20] mm, dax, pmem: introduce {get|put}_dev_pagemap() for dax-gup Dan Williams
2015-10-10  0:57 ` [PATCH v2 18/20] block: notify queue death confirmation Dan Williams
2015-10-10  0:57 ` [PATCH v2 19/20] mm, pmem: devm_memunmap_pages(), truncate and unmap ZONE_DEVICE pages Dan Williams
2015-10-10  0:57 ` [PATCH v2 20/20] mm, x86: get_user_pages() for dax mappings Dan Williams
2015-10-23 21:06 ` [PATCH v2 00/20] " Logan Gunthorpe
2015-11-30 22:15   ` Dan Williams
2015-12-02 22:02     ` Logan Gunthorpe
2015-12-02 22:04       ` Dan Williams
2015-12-04  2:16       ` Dan Williams
2015-12-05  1:58         ` Logan Gunthorpe
2015-12-08  0:00           ` Logan Gunthorpe
2015-12-08  0:48             ` Dan Williams

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=20151010153511.GG29128@cbox \
    --to=christoffer.dall@linaro.org \
    --cc=agraf@suse.com \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave@sr71.net \
    --cc=gleb@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=linux@arm.linux.org.uk \
    --cc=marc.zyngier@arm.com \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=ross.zwisler@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).