]> xenbits.xensource.com Git - xen.git/commit
x86/paging: deal with log-dirty stats overflow
authorJan Beulich <jbeulich@suse.com>
Tue, 29 Jun 2021 09:02:35 +0000 (11:02 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Jun 2021 09:02:35 +0000 (11:02 +0200)
commit17e91570c5a442d0500b05c157966ac212a1f12f
treeb3f299944b45d72253a53ab4264d70bc25a58c6f
parentf24ec0ed220a43e19059c3fe4f803be458930a1d
x86/paging: deal with log-dirty stats overflow

While the precise values are unlikely of interest once they exceed 4
billion (allowing us to leave alone the domctl struct), we still
shouldn't wrap or truncate the actual values. It is in particular
problematic if the truncated values were zero (causing libxenguest to
skip an iteration altogether) or a very small value (leading to
premature exiting of the pre-copy phase).

Change the internal fields to unsigned long, and suitably saturate for
copying to guest context.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/paging.c
xen/include/asm-x86/domain.h