qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] exec: Exclude non portable function for MinGW
@ 2014-01-14  6:00 Stefan Weil
  2014-01-14 17:26 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Weil @ 2014-01-14  6:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Stefan Weil

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.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 include/exec/ram_addr.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 33c8acc..481a447 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -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,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] exec: Exclude non portable function for MinGW
  2014-01-14  6:00 [Qemu-devel] [PATCH] exec: Exclude non portable function for MinGW Stefan Weil
@ 2014-01-14 17:26 ` Michael Tokarev
  2014-01-14 17:40   ` Stefan Weil
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Tokarev @ 2014-01-14 17:26 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel

14.01.2014 10:00, Stefan Weil wrote:
> 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.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] exec: Exclude non portable function for MinGW
  2014-01-14 17:26 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
@ 2014-01-14 17:40   ` Stefan Weil
  2014-01-14 18:18     ` Juan Quintela
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Weil @ 2014-01-14 17:40 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-trivial, qemu-devel, Juan Quintela

Am 14.01.2014 18:26, schrieb Michael Tokarev:
> 14.01.2014 10:00, Stefan Weil wrote:
>> 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.
> 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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] exec: Exclude non portable function for MinGW
  2014-01-14 17:40   ` Stefan Weil
@ 2014-01-14 18:18     ` Juan Quintela
  0 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2014-01-14 18:18 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, Michael Tokarev, qemu-devel

Stefan Weil <sw@weilnetz.de> wrote:
> Am 14.01.2014 18:26, schrieb Michael Tokarev:
>> 14.01.2014 10:00, Stefan Weil wrote:
>>> 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.
>> 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
>
> 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.


>
> 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?

The "soon" was introduced when Memory API was included, and we are still
waiting on TCG.

Later, Juan.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-14 18:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14  6:00 [Qemu-devel] [PATCH] exec: Exclude non portable function for MinGW Stefan Weil
2014-01-14 17:26 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-01-14 17:40   ` Stefan Weil
2014-01-14 18:18     ` Juan Quintela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).