]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mm: Introduce lookup_address_in_mm()
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 8 Jan 2020 20:24:39 +0000 (12:24 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 27 Jan 2020 19:00:03 +0000 (20:00 +0100)
commit40fa8d51eea5cda3c7ec394270b0fe6f204f9bbe
treec0043704b8ec370deff286db8bbaa8f8ebed74dd
parent02012fc56d85439d61d8a544b8a4e4c7d33d2b56
x86/mm: Introduce lookup_address_in_mm()

Add a helper, lookup_address_in_mm(), to traverse the page tables of a
given mm struct.  KVM will use the helper to retrieve the host mapping
level, e.g. 4k vs. 2mb vs. 1gb, of a compound (or DAX-backed) page
without having to resort to implementation specific metadata.  E.g. KVM
currently uses different logic for HugeTLB vs. THP, and would add a
third variant for DAX-backed files.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/pgtable_types.h
arch/x86/mm/pageattr.c