Merge tag 'stable/for-linus-3.19-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull additional xen update from David Vrabel: "Xen: additional features for 3.19-rc0 - Linear p2m for x86 PV guests which simplifies the p2m code, improves performance and will allow for > 512 GB PV guests in the future. A last-minute, configuration specific issue was discovered with this change which is why it was not included in my previous pull request. This is now been fixed and tested" * tag 'stable/for-linus-3.19-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: switch to post-init routines in xen mmu.c earlier Revert "swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single" xen: annotate xen_set_identity_and_remap_chunk() with __init xen: introduce helper functions to do safe read and write accesses xen: Speed up set_phys_to_machine() by using read-only mappings xen: switch to linear virtual mapped sparse p2m list xen: Hide get_phys_to_machine() to be able to tune common path x86: Introduce function to get pmd entry pointer xen: Delay invalidating extra memory xen: Delay m2p_override initialization xen: Delay remapping memory of pv-domain xen: use common page allocation function in p2m.c xen: Make functions static xen: fix some style issues in p2m.c
This commit is contained in:
@@ -383,6 +383,26 @@ static pte_t *_lookup_address_cpa(struct cpa_data *cpa, unsigned long address,
|
||||
return lookup_address(address, level);
|
||||
}
|
||||
|
||||
/*
|
||||
* Lookup the PMD entry for a virtual address. Return a pointer to the entry
|
||||
* or NULL if not present.
|
||||
*/
|
||||
pmd_t *lookup_pmd_address(unsigned long address)
|
||||
{
|
||||
pgd_t *pgd;
|
||||
pud_t *pud;
|
||||
|
||||
pgd = pgd_offset_k(address);
|
||||
if (pgd_none(*pgd))
|
||||
return NULL;
|
||||
|
||||
pud = pud_offset(pgd, address);
|
||||
if (pud_none(*pud) || pud_large(*pud) || !pud_present(*pud))
|
||||
return NULL;
|
||||
|
||||
return pmd_offset(pud, address);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is necessary because __pa() does not work on some
|
||||
* kinds of memory, like vmalloc() or the alloc_remap()
|
||||
|
Reference in New Issue
Block a user