On 22/4/25 21:26, Richard Henderson wrote: > From: Pierrick Bouvier <pierrick.bouvier@linaro.org> > > Reviewed-by: Richard Henderson <richard.henderson@linaro.org> > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > Message-ID: <20250317183417.285700-12-pierrick.bouvier@linaro.org> > --- > include/exec/ram_addr.h | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h > index f5d574261a..92e8708af7 100644 > --- a/include/exec/ram_addr.h > +++ b/include/exec/ram_addr.h > @@ -339,7 +339,9 @@ static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start, > } > } > > - xen_hvm_modified_memory(start, length); > + if (xen_enabled()) { > + xen_hvm_modified_memory(start, length); > + } > } I thought you suggested to un-inline first: https://lore.kernel.org/qemu-devel/9151205a-13d3-401e-b403-f9195cdb1a45@linaro.org/ Can be done later.
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index f5d574261a..92e8708af7 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -339,7 +339,9 @@ static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start, } } - xen_hvm_modified_memory(start, length); + if (xen_enabled()) { + xen_hvm_modified_memory(start, length); + } } #if !defined(_WIN32) @@ -415,7 +417,9 @@ uint64_t cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap, } } - xen_hvm_modified_memory(start, pages << TARGET_PAGE_BITS); + if (xen_enabled()) { + xen_hvm_modified_memory(start, pages << TARGET_PAGE_BITS); + } } else { uint8_t clients = tcg_enabled() ? DIRTY_CLIENTS_ALL : DIRTY_CLIENTS_NOCODE;