On 10.12.2024 15:45, Frediano Ziglio wrote: > On Tue, Dec 10, 2024 at 10:38 AM Jan Beulich <jbeul...@suse.com> wrote: >> On 22.11.2024 10:33, Frediano Ziglio wrote: >>> switch ( magic ) >>> { >>> case MULTIBOOT_BOOTLOADER_MAGIC: >>> - return mbi_reloc(in, &ctx); >>> + res = mbi_reloc(in, &ctx); >>> + break; >>> >>> case MULTIBOOT2_BOOTLOADER_MAGIC: >>> - return mbi2_reloc(in, &ctx); >>> + res = mbi2_reloc(in, &ctx); >>> + break; >>> >>> case XEN_HVM_START_MAGIC_VALUE: >>> if ( IS_ENABLED(CONFIG_PVH_GUEST) ) >>> - return pvh_info_reloc(in, &ctx); >>> + { >>> + res = pvh_info_reloc(in, &ctx); >>> + break; >>> + } >>> /* Fallthrough */ >>> >>> default: >>> /* Nothing we can do */ >>> - return NULL; >>> + res = NULL; >> >> Simply keep returning here? No need to write the NULL when the variables >> start out zeroed? >> > > Yes, considering pvh_start_info_pa and multiboot_ptr should be already > NULL it makes sense > >>> } >>> + >>> +#ifdef CONFIG_PVH_GUEST >>> + if ( pvh_boot ) >>> + pvh_start_info_pa = (unsigned long)res; >>> +#endif >>> + >>> + multiboot_ptr = (unsigned long)res; >> >> In the assembly original this is an "else" to the if(). >> > > I suppose the return change above would solve also this.
I'm not convinced of this. Jan