Without this, Dom0 will have have a curiously off-by-1 target_memkb value displayed by "xl list -l".
Signed-off-by: Jan Beulich <jbeul...@suse.com> --- In retrieve_domain_configuration_end(), isn't it the wrong way round to set both ->b_info.target_memkb and ->b_info.max_memkb only after calling libxl__get_targetmem_fudge(), when that uses the two fields? This way we could as well use ->b_info->video_memkb directly there. Of course this may point at a bigger problem, as other fields may similarly never be set for Dom0. --- a/tools/libs/light/libxl_internal.h +++ b/tools/libs/light/libxl_internal.h @@ -4685,7 +4685,10 @@ uint64_t libxl__get_targetmem_fudge(libx info->max_memkb > info->target_memkb) ? LIBXL_MAXMEM_CONSTANT : 0; - return info->video_memkb + mem_target_fudge; + if (info->video_memkb != LIBXL_MEMKB_DEFAULT) + mem_target_fudge += info->video_memkb; + + return mem_target_fudge; } int libxl__get_memory_target(libxl__gc *gc, uint32_t domid,