Files
qemu/system
Bin Guo bf7ce99494 physmem: Simplify dirty memory type checks with loop
In physical_memory_range_includes_clean(), we have three nearly identical
if-statements checking different DIRTY_MEMORY types (VGA, CODE, MIGRATION).
This code duplication makes maintenance harder and increases the risk of
inconsistencies when adding new dirty memory types.

Replace the repetitive checks with a simple loop that iterates through
all DIRTY_MEMORY_NUM types, checking only those specified in the mask.
This reduces code size and makes it easier to add new dirty memory types
in the future.

Signed-off-by: Bin Guo <guobin@linux.alibaba.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260401100005.20651-1-guobin@linux.alibaba.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2026-04-24 21:27:21 +02:00
..
2024-12-20 17:44:56 +01:00
2025-04-23 14:08:44 -07:00
2026-02-23 00:17:34 +01:00
2025-05-28 08:07:59 +01:00
2026-04-22 12:51:51 +04:00
2026-04-22 12:51:51 +04:00