On 06/01/2020 15:35, Jan Beulich wrote: > After dad74b0f9e ("i386: fix handling of Xen entries in final L2 page > table") and the removal of 32-bit support the function doesn't modify > state anymore, and hence its name has been misleading. Change its name, > constify parameters and a local variable, and make it return bool. > > Also drop the call to it from mod_l3_entry(): The function explicitly > disallows 32-bit domains to modify slot 3. This way we also won't > re-check slot 3 when a slot other than slot 3 changes. Doing so has > needlessly disallowed making some L2 table recursively link back to an > L2 used in some L3's 3rd slot, as we check for the type ref count to be > 1. (Note that allowing dynamic changes of L3 entries in the way we do is > bogus anyway, as that's not how L3s behave in the native and EPT cases: > They get re-evaluated only upon CR3 reloads. NPT is different in this > regard.) > > As a result of this we no longer need to play games to get at the start > of the L3 table. > > Additionally move the single remaining call site, allowing to drop one > is_pv_32bit_domain() invocation and a _PAGE_PRESENT check (in the > function itself) as well as to exit the loop early (remaining entries > have all ben set to empty just ahead of this loop).
been. > > Further move a BUG_ON() such that in the common case its condition > wouldn't need evaluating. > > Finally, since we're at it, move init_xen_pae_l2_slots() next to the > renamed function, as they really belong together (in fact > init_xen_pae_l2_slots() was [indirectly] broken out of this function). > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel