On 28/09/18 18:06, Wei Liu wrote:
> diff --git a/xen/arch/x86/guest/pvh-boot.c b/xen/arch/x86/guest/pvh-boot.c
> index 0e9e5bfdf6..3b44aee90a 100644
> --- a/xen/arch/x86/guest/pvh-boot.c
> +++ b/xen/arch/x86/guest/pvh-boot.c
> @@ -42,7 +42,17 @@ static void __init convert_pvh_info(void)
> module_t *mod;
> unsigned int i;
>
> - ASSERT(pvh_info->magic == XEN_HVM_START_MAGIC_VALUE);
> + if ( pvh_info->magic != XEN_HVM_START_MAGIC_VALUE )
> + panic("Magic value is wrong: %X\n", pvh_info->magic);
%x ?
> +
> + /*
> + * Temporary module array needs to be at least one element bigger than
> + * required. The extra element is used to aid relocation. See
> + * arch/x86/setup.c:__start_xen().
> + */
> + if ( ARRAY_SIZE(pvh_mbi_mods) <= pvh_info->nr_modules )
> + panic("The module array is too small, size %lu, requested %u.\n",
%zu for size_t, and please drop the unnecessary trailing .
Otherwise, Reviewed-by: Andrew Cooper <[email protected]>
> + ARRAY_SIZE(pvh_mbi_mods), pvh_info->nr_modules);
>
> /*
> * Turn hvm_start_info into mbi. Luckily all modules are placed under 4GB
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel