On 05/08/2025 8:59 am, Jan Beulich wrote:
> While it is correct that in shim-exclusive mode log-dirty handling is
> all unreachable code, the present conditional still isn't correct: In a
> HVM=n and SHADOW_PAGING=n configuration log-dirty code also is all
> unreachable (and hence violating Misra rule 2.1).
>
> As we're aiming at moving away from special casing PV_SHIM_EXCLUSIVE=y,
> don't retain that part of the conditional.
>
> Because of hypercall-defs.c we need to carry out the dependency by
> introducing a new auxiliary PAGING control.
>
> Since compiling out mm/paging.c altogether would entail further changes,
> merely conditionalize the one function in there (paging_enable()) which
> would otherwise remain unreachable (Misra rule 2.1 again) when PAGING=n.
>
> Fixes: 23d4e0d17b76 ("x86/shim: fix build with PV_SHIM_EXCLUSIVE and 
> SHADOW_PAGING")
> Signed-off-by: Jan Beulich <[email protected]>

Acked-by: Andrew Cooper <[email protected]>

> ---
> Of course PAGING is at risk of being confused with MEM_PAGING. It not
> having a prompt, I hope that's tolerable, as I can't really think of a
> better name.

Honestly, PAGING is a bad name start with.  While it is to do with the
handling of pages, it is specifically not what people think of when
using the term paging.

Hence why we've got MEM_PAGING too, which is referring to what most
people think of when told the name paging.

I don't have a better suggestion, given the current codebase, but I'm
open to suggestions.

~Andrew

Reply via email to