On 16/05/2023 8:39 am, Jan Beulich wrote: > shadow_mode_...(), with the exception of shadow_mode_enabled(), are > shorthands for shadow_mode_enabled() && paging_mode_...(). While > potentially useful outside of shadow-internal functions, when we already > know that we're dealing with a domain in shadow mode, the "paging" > checks are sufficient and cheaper. While the "shadow" ones commonly > translate to a MOV/AND/CMP/Jcc sequence, the "paging" ones typically > resolve to just TEST+Jcc.
That's because shadow_*() are checking a minimum of 2 bits, while most of the paging_*() ones are only checking a single bit. > Signed-off-by: Jan Beulich <[email protected]> Acked-by: Andrew Cooper <[email protected]>
