Message ID | 20250311040838.3937136-12-pierrick.bouvier@linaro.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | make system memory API available for common code | expand |
On 11/3/25 05:08, Pierrick Bouvier wrote: > Reviewed-by: Richard Henderson <richard.henderson@linaro.org> > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> I didn't follow this direction because Richard had a preference on removing unnecessary inlined functions: https://lore.kernel.org/qemu-devel/9151205a-13d3-401e-b403-f9195cdb1a45@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 7c011fadd11..098fccb5835 100644 > --- a/include/exec/ram_addr.h > +++ b/include/exec/ram_addr.h > @@ -342,7 +342,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); > + } > }
On 3/11/25 00:29, Philippe Mathieu-Daudé wrote: > On 11/3/25 05:08, Pierrick Bouvier wrote: >> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> >> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> > > I didn't follow this direction because Richard had a preference > on removing unnecessary inlined functions: > https://lore.kernel.org/qemu-devel/9151205a-13d3-401e-b403-f9195cdb1a45@linaro.org/ > The patch you mention was moving code, which can be arguably different from simply editing existing one. That said, and even though the concern is real, I would appreciate to keep this series focused on achieving the goal, and not doing a refactor of the involved headers. >> --- >> 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 7c011fadd11..098fccb5835 100644 >> --- a/include/exec/ram_addr.h >> +++ b/include/exec/ram_addr.h >> @@ -342,7 +342,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); >> + } >> } >
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 7c011fadd11..098fccb5835 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -342,7 +342,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) @@ -418,7 +420,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;