|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 09/14] hvmloader: Check modules whereabouts in perform_tests
On Mon, Mar 14, 2016 at 05:55:44PM +0000, Anthony PERARD wrote:
> As perform_tests() is going to clear memory past 4MB, we check that the
> memory can be use or we skip the tests.
I get the reason you want this - but if we have giant binary blobs
and something else screws up what the tests are testing for- we
don't have a regression test anymore.
.. Oh my looking at rep_io_test and trying to make it more dynamic
is tricky but should be managable?
I presume that is the test that blows everything out of the sky?
And also the placement of the page tables?
>
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
> Changes in v4:
> - move the check into the perform_test() function.
> - skip tests instead of using BUG.
>
> New in V3
> ---
> tools/firmware/hvmloader/tests.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/tools/firmware/hvmloader/tests.c
> b/tools/firmware/hvmloader/tests.c
> index fea3ad3..7996206 100644
> --- a/tools/firmware/hvmloader/tests.c
> +++ b/tools/firmware/hvmloader/tests.c
> @@ -210,6 +210,26 @@ void perform_tests(void)
> return;
> }
>
> + /* Check that tests does not use memory where modules are stored */
> + if ( ((uint32_t)hvm_start_info + sizeof(struct hvm_start_info)) > 4 << 20
> + && (uint32_t)hvm_start_info < 8 << 20 )
> + {
> + printf("Skipping tests due to memory used by hvm_start_info\n");
> + return;
> + }
> + for ( unsigned i = 0; i < hvm_start_info->nr_modules; i++ )
> + {
> + const struct hvm_modlist_entry *modlist =
> + (struct hvm_modlist_entry *)hvm_start_info->modlist_paddr;
> + if ( modlist[i].paddr
> + && modlist[i].paddr + modlist[i].size > 4ul << 20
> + && modlist[i].paddr < 8ul << 20 )
> + {
> + printf("Skipping tests due to memory used by a module\n");
> + return;
> + }
> + }
> +
> passed = skipped = 0;
> for ( i = 0; tests[i].test; i++ )
> {
> --
> Anthony PERARD
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |