x86/mtrr: move epte_get_entry_emt to p2m-ept.c
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 17 Jun 2021 15:58:11 +0000 (17:58 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 17 Jun 2021 15:58:11 +0000 (17:58 +0200)
commited464d4e8a9a49559307c96ee6aa59e97820f692
tree6d2725f833eaed0334eba895be5a1c4b3722286c
parent4bcf6433eed3d9cbc00865ec62380a33ca832dac
x86/mtrr: move epte_get_entry_emt to p2m-ept.c

This is an EPT specific function, so it shouldn't live in the generic
mtrr file. Such movement is also needed for future work that will
require passing a p2m_type_t parameter to epte_get_entry_emt, and
making that type visible to the mtrr users is cumbersome and
unneeded.

Moving epte_get_entry_emt out of mtrr.c requires making the helper to
get the MTRR type of an address from the mtrr state public. While
there rename the function to start with the mtrr prefix, like other
mtrr related functions.

While there fix some of the types of the function parameters.

No functional change intended.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/mtrr.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/mm/p2m-ept.c
xen/include/asm-x86/hvm/vmx/vmx.h
xen/include/asm-x86/mtrr.h