[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 2/3] x86/mtrr: move epte_get_entry_emt to p2m-ept.c
On 28.05.2021 19:39, Roger Pau Monne wrote: > 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@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -417,12 +417,12 @@ static int vmx_domain_initialise(struct domain *d) > static void domain_creation_finished(struct domain *d) > { > gfn_t gfn = gaddr_to_gfn(APIC_DEFAULT_PHYS_BASE); > - uint8_t ipat; > + bool ipat; > > if ( !has_vlapic(d) || mfn_eq(apic_access_mfn, INVALID_MFN) ) > return; > > - ASSERT(epte_get_entry_emt(d, gfn_x(gfn), apic_access_mfn, 0, &ipat, > + ASSERT(epte_get_entry_emt(d, gfn, apic_access_mfn, 0, &ipat, > true) == MTRR_TYPE_WRBACK); > ASSERT(ipat); This being the only reason for the function to not be static in p2m-ept.c, I wonder whether it's really worthwhile to keep these assertions. But certainly not directly related to change at hand. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |