On 11.12.2024 18:27, Oleksii Kurochko wrote:
> @@ -175,10 +176,16 @@ static inline void invalidate_icache(void)
> #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
> #define copy_page(dp, sp) memcpy(dp, sp, PAGE_SIZE)
>
> -/* TODO: Flush the dcache for an entire page. */
> static inline void flush_page_to_ram(unsigned long mfn, bool sync_icache)
> {
> - BUG_ON("unimplemented");
> + const void *v = map_domain_page(_mfn(mfn));
> +
> + BUG_ON(clean_and_invalidate_dcache_va_range(v, PAGE_SIZE));
Please avoid expressions with side effects in BUG_ON(). This wants to be
if ( clean_and_invalidate_dcache_va_range(v, PAGE_SIZE) )
BUG();
Then
Acked-by: Jan Beulich <[email protected]>
Jan