Hi Boris, On 16/08/17 19:33, Boris Ostrovsky wrote:
+static void check_one_page(struct page_info *pg) +{ +#ifdef CONFIG_SCRUB_DEBUG + mfn_t mfn = _mfn(page_to_mfn(pg)); + const uint64_t *ptr; + unsigned int i; + + if ( !boot_scrub_done ) + return; + + ptr = map_domain_page(mfn); + for ( i = 0; i < PAGE_SIZE / sizeof (*ptr); i++ ) + ASSERT(ptr[i] == SCRUB_PATTERN);
ASSERT will be turned into a NOP on non-debug build. However, it is possible to select SCRUB_DEBUG on non-debug build when expert mode is enabled.
So I would turn this into a BUG_ON() to make it work in all configuration. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel