xen/arm: mm: Only increment mfn when valid in xen_pt_update
authorJulien Grall <julien.grall@arm.com>
Fri, 22 Mar 2019 17:22:43 +0000 (17:22 +0000)
committerJulien Grall <julien.grall@arm.com>
Fri, 14 Jun 2019 17:35:46 +0000 (18:35 +0100)
commit4a53f2c7f9b978f3bb45a8e8861d483c790cbb35
tree105ea515da00f50e077fb2c9bd0cad9a38b6b2cd
parenta892cac85b6ec5ea80855f0fad5a867aee9b19d6
xen/arm: mm: Only increment mfn when valid in xen_pt_update

Currently, the MFN will be incremented even if it is invalid. This will
result to have a valid MFN after the first iteration.

While this is not a major problem today, this will be in the future if
the code expect an invalid MFN at every iteration.

Such behavior is prevented by avoiding to increment an invalid MFN.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/mm.c