exec: Exclude non portable function for MinGW
PATCH 1/1 exec: Exclude non portable function for MinGW
cpu_physical_memory_set_dirty_lebitmap calls getpageaddr and ffsl which are unavailable for MinGW. As the function is unused for MinGW, it can simply be excluded from compilation.
--- include/exec/ram_addr.h | 2 ++ 1 file changed, 2 insertions(+)
include/exec/ram_addr.h +2 -0
@@ -79,6 +79,7 @@ static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start,xen_modified_memory (start, length); } +#if !defined(_WIN32)static inline void cpu_physical_memory_set_dirty_lebitmap (unsigned long *bitmap,ram_addr_t start,ram_addr_t pages)
@@ -127,6 +128,7 @@ static inline void cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap, } } } +#endif /* not _WIN32 */ static inline void cpu_physical_memory_clear_dirty_range(ram_addr_t start, ram_addr_t length,
Signature · 1 line
1.7.10.4
Michael Tokarev
AppliedQuoted 3 lines · Stefan Weil
cpu_physical_memory_set_dirty_lebitmapcalls getpageaddr and ffsl which are unavailable for MinGW. As the function is unused for MinGW, it can simply be excluded from compilation.
I applied it to -trivial. But maybe it's better to just move whole thing to kvm-all.c where it is actually used?
Thanks,
/mjt
Am 14.01.2014 18:26, schrieb Michael Tokarev:
Quoted 10 lines
Quoted 3 lines · Stefan Weil
cpu_physical_memory_set_dirty_lebitmapcalls getpageaddr and ffsl which are unavailable for MinGW. As the function is unused for MinGW, it can simply be excluded from compilation.I applied it to -trivial. But maybe it's better to just move whole thing to
kvm-all.cwhere it is actually used?Thanks,
/mjt
That's a good suggestion.
Juan, a comment in include/exec/ram_addr.h says that those functions will be removed soon. Would you suggest moving them to kvm-all.c now, or would you prefer the conditional compilation for MinGW which I introduced with my patch?
Regards,
Stefan
Quoted 9 lines · Stefan Weil
Am 14.01.2014 18:26, schrieb Michael Tokarev:
Quoted 8 lines
Quoted 3 lines · Stefan Weil
cpu_physical_memory_set_dirty_lebitmapcalls getpageaddr and ffsl which are unavailable for MinGW. As the function is unused for MinGW, it can simply be excluded from compilation.I applied it to -trivial. But maybe it's better to just move whole thing to
kvm-all.cwhere
it is actually used?
Quoted 5 lines
Quoted 3 lines
Thanks,
/mjt
That's a good suggestion.
Let it as your change. Functions on ram_addr.h should be opaque, and nothing else should access the bitmap.
Quoted 5 lines
Juan, a comment in
include/exec/ram_addr.hsays that those functions will be removed soon. Would you suggest moving them tokvm-all.cnow, or would you prefer the conditional compilation for MinGW which I introduced with my patch?
The "soon" was introduced when Memory API was included, and we are still waiting on TCG.
Later, Juan.