On 11.06.2025 19:16, Roger Pau Monne wrote: > This is the code already present and used by x86 in setup_max_pdx(), which > takes into account the current PDX compression, plus the limitation of the > virtual memory layout to return the maximum usable PFN in the system, > possibly truncating the input PFN provided by the caller. > > This helper will be used by upcoming PDX related changes that introduce a > new compression algorithm. > > Signed-off-by: Roger Pau Monné <roger....@citrix.com> > --- > xen/arch/x86/setup.c | 19 ++----------------- > xen/common/pdx.c | 25 +++++++++++++++++++++++++ > xen/include/xen/pdx.h | 8 ++++++++ > 3 files changed, 35 insertions(+), 17 deletions(-)
This is all fine for x86, but on Arm you introduce unreachable code, which Misra dislikes. Yet then it feels like it's wrong anyway that the function isn't used there. Jan