OpenCloudOS-Kernel/arch/arm/kvm
Dan Williams ba049e93ae kvm: rename pfn_t to kvm_pfn_t
To date, we have implemented two I/O usage models for persistent memory,
PMEM (a persistent "ram disk") and DAX (mmap persistent memory into
userspace).  This series adds a third, DAX-GUP, that allows DAX mappings
to be the target of direct-i/o.  It allows userspace to coordinate
DMA/RDMA from/to persistent memory.

The implementation leverages the ZONE_DEVICE mm-zone that went into
4.3-rc1 (also discussed at kernel summit) to flag pages that are owned
and dynamically mapped by a device driver.  The pmem driver, after
mapping a persistent memory range into the system memmap via
devm_memremap_pages(), arranges for DAX to distinguish pfn-only versus
page-backed pmem-pfns via flags in the new pfn_t type.

The DAX code, upon seeing a PFN_DEV+PFN_MAP flagged pfn, flags the
resulting pte(s) inserted into the process page tables with a new
_PAGE_DEVMAP flag.  Later, when get_user_pages() is walking ptes it keys
off _PAGE_DEVMAP to pin the device hosting the page range active.
Finally, get_page() and put_page() are modified to take references
against the device driver established page mapping.

Finally, this need for "struct page" for persistent memory requires
memory capacity to store the memmap array.  Given the memmap array for a
large pool of persistent may exhaust available DRAM introduce a
mechanism to allocate the memmap from persistent memory.  The new
"struct vmem_altmap *" parameter to devm_memremap_pages() enables
arch_add_memory() to use reserved pmem capacity rather than the page
allocator.

This patch (of 18):

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

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-01-15 17:56:32 -08:00
..
Kconfig arm/arm64: KVM : Enable vhost device selection under KVM config menu 2015-10-22 23:01:45 +02:00
Makefile KVM: arm/arm64: Enable the KVM-VFIO device 2015-06-17 09:46:29 +01:00
arm.c arm/arm64: KVM: Detect vGIC presence at runtime 2015-12-18 12:01:58 +00:00
coproc.c arm/arm64: KVM: Use set/way op trapping to track the state of the caches 2015-01-29 23:24:56 +01:00
coproc.h arm/arm64: KVM: Use set/way op trapping to track the state of the caches 2015-01-29 23:24:56 +01:00
coproc_a7.c arm/arm64: KVM: Use set/way op trapping to track the state of the caches 2015-01-29 23:24:56 +01:00
coproc_a15.c arm/arm64: KVM: Use set/way op trapping to track the state of the caches 2015-01-29 23:24:56 +01:00
emulate.c ARM: KVM: Cleanup exception injection 2015-12-18 10:14:54 +00:00
guest.c KVM: arm/arm64: Count guest exit due to various reasons 2015-12-14 11:30:00 +00:00
handle_exit.c KVM: arm/arm64: Count guest exit due to various reasons 2015-12-14 11:30:00 +00:00
init.S ARM: kvm: round HYP section to page size instead of log2 upper bound 2015-03-27 12:21:27 +00:00
interrupts.S arm: KVM: keep arm vfp/simd exit handling consistent with arm64 2015-08-19 22:27:58 +01:00
interrupts_head.S arm: KVM: Disable virtual timer even if the guest is not using it 2015-09-17 13:11:48 +01:00
mmio.c KVM: arm/arm64: Count guest exit due to various reasons 2015-12-14 11:30:00 +00:00
mmu.c kvm: rename pfn_t to kvm_pfn_t 2016-01-15 17:56:32 -08:00
perf.c ARM: KVM: add support for minimal host vs guest profiling 2013-04-28 21:44:01 -07:00
psci.c arm64: KVM: Get rid of old vcpu_reg() 2015-12-04 16:30:03 +00:00
reset.c KVM: arm/arm64: timer: Allow the timer to control the active state 2015-08-12 11:28:26 +01:00
trace.h arm/arm64: KVM: Improve kvm_exit tracepoint 2015-10-22 23:01:47 +02:00