The primary goal of this series is to leave p2m.c with, as its leading comment suggests, just code for "physical-to-machine mappings for automatically-translated domains". This requires splitting a few functions, with their non-HVM parts moved elsewhere.
01: x86/P2M: rename p2m_remove_page() 02: x86/P2M: introduce p2m_{add,remove}_page() 03: x86/P2M: drop a few CONFIG_HVM 04: x86/P2M: move map_domain_gfn() (again) 05: x86/mm: move guest_physmap_{add,remove}_page() 06: x86/mm: split set_identity_p2m_entry() into PV and HVM parts 07: x86/P2M: p2m_{alloc,free}_ptp() and p2m_alloc_table() are HVM-only 08: x86/P2M: PoD, altp2m, and nested-p2m are HVM-only 09: x86/P2M: split out init/teardown functions 10: x86/P2M: p2m_get_page_from_gfn() is HVM-only 11: x86/P2M: derive a HVM-only variant from __get_gfn_type_access() 12: x86/p2m: re-arrange {,__}put_gfn() 13: shr_pages field is MEM_SHARING-only 14: paged_pages field is MEM_PAGING-only 15: x86/P2M: p2m.c is HVM-only 16: x86/P2M: the majority for struct p2m_domain's fields are HVM-only Jan