* [PATCH] don't use a 32-bit bit type as offset argument.
@ 2009-05-13 19:21 Glauber Costa
2009-05-13 20:23 ` Ryan Harper
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Glauber Costa @ 2009-05-13 19:21 UTC (permalink / raw)
To: kvm; +Cc: avi
In the call path of kvm_get_dirty_pages_log_range(),
its caller kvm_get_dirty_bitmap_cb() passes the
target_phys_addr_t both as start_addr and the offset.
So, using int will make dirty tracking over 4G fail
completely.
Of course we should be using qemu types in
here, so please don't get me started on this. The whole
file is wrong already ;)
Signed-off-by: Glauber Costa <glommer@redhat.com>
---
qemu-kvm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu-kvm.c b/qemu-kvm.c
index f55cee8..27c37b5 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1201,7 +1201,7 @@ int kvm_physical_memory_set_dirty_tracking(int enable)
/* get kvm's dirty pages bitmap and update qemu's */
static int kvm_get_dirty_pages_log_range(unsigned long start_addr,
unsigned char *bitmap,
- unsigned int offset,
+ unsigned long offset,
unsigned long mem_size)
{
unsigned int i, j, n=0;
--
1.5.6.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] don't use a 32-bit bit type as offset argument.
2009-05-13 19:21 [PATCH] don't use a 32-bit bit type as offset argument Glauber Costa
@ 2009-05-13 20:23 ` Ryan Harper
2009-05-13 20:36 ` Glauber Costa
2009-05-13 21:43 ` Anthony Liguori
2009-05-14 12:16 ` Avi Kivity
2 siblings, 1 reply; 5+ messages in thread
From: Ryan Harper @ 2009-05-13 20:23 UTC (permalink / raw)
To: Glauber Costa; +Cc: kvm, avi
* Glauber Costa <glommer@redhat.com> [2009-05-13 14:22]:
> In the call path of kvm_get_dirty_pages_log_range(),
> its caller kvm_get_dirty_bitmap_cb() passes the
> target_phys_addr_t both as start_addr and the offset.
> So, using int will make dirty tracking over 4G fail
> completely.
Does this patch fix someting like 32-bit migration with >4G ? Seems
like it might.
>
> Of course we should be using qemu types in
> here, so please don't get me started on this. The whole
> file is wrong already ;)
>
> Signed-off-by: Glauber Costa <glommer@redhat.com>
> ---
> qemu-kvm.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/qemu-kvm.c b/qemu-kvm.c
> index f55cee8..27c37b5 100644
> --- a/qemu-kvm.c
> +++ b/qemu-kvm.c
> @@ -1201,7 +1201,7 @@ int kvm_physical_memory_set_dirty_tracking(int enable)
> /* get kvm's dirty pages bitmap and update qemu's */
> static int kvm_get_dirty_pages_log_range(unsigned long start_addr,
> unsigned char *bitmap,
> - unsigned int offset,
> + unsigned long offset,
> unsigned long mem_size)
> {
> unsigned int i, j, n=0;
> --
> 1.5.6.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@us.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] don't use a 32-bit bit type as offset argument.
2009-05-13 20:23 ` Ryan Harper
@ 2009-05-13 20:36 ` Glauber Costa
0 siblings, 0 replies; 5+ messages in thread
From: Glauber Costa @ 2009-05-13 20:36 UTC (permalink / raw)
To: Ryan Harper; +Cc: Glauber Costa, kvm, avi
On Wed, May 13, 2009 at 5:23 PM, Ryan Harper <ryanh@us.ibm.com> wrote:
> * Glauber Costa <glommer@redhat.com> [2009-05-13 14:22]:
>> In the call path of kvm_get_dirty_pages_log_range(),
>> its caller kvm_get_dirty_bitmap_cb() passes the
>> target_phys_addr_t both as start_addr and the offset.
>> So, using int will make dirty tracking over 4G fail
>> completely.
>
> Does this patch fix someting like 32-bit migration with >4G ? Seems
> like it might.
it fixes general > 4G migration. I tested a 64-bit guest on a 64-bit host,
and it does not work previous to this patch
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] don't use a 32-bit bit type as offset argument.
2009-05-13 19:21 [PATCH] don't use a 32-bit bit type as offset argument Glauber Costa
2009-05-13 20:23 ` Ryan Harper
@ 2009-05-13 21:43 ` Anthony Liguori
2009-05-14 12:16 ` Avi Kivity
2 siblings, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2009-05-13 21:43 UTC (permalink / raw)
To: Glauber Costa; +Cc: kvm, avi
Glauber Costa wrote:
> In the call path of kvm_get_dirty_pages_log_range(),
> its caller kvm_get_dirty_bitmap_cb() passes the
> target_phys_addr_t both as start_addr and the offset.
> So, using int will make dirty tracking over 4G fail
> completely.
>
> Of course we should be using qemu types in
> here, so please don't get me started on this. The whole
> file is wrong already ;)
>
:-)
> Signed-off-by: Glauber Costa <glommer@redhat.com>
>
Good candidate for stable too.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] don't use a 32-bit bit type as offset argument.
2009-05-13 19:21 [PATCH] don't use a 32-bit bit type as offset argument Glauber Costa
2009-05-13 20:23 ` Ryan Harper
2009-05-13 21:43 ` Anthony Liguori
@ 2009-05-14 12:16 ` Avi Kivity
2 siblings, 0 replies; 5+ messages in thread
From: Avi Kivity @ 2009-05-14 12:16 UTC (permalink / raw)
To: Glauber Costa; +Cc: kvm
Glauber Costa wrote:
> In the call path of kvm_get_dirty_pages_log_range(),
> its caller kvm_get_dirty_bitmap_cb() passes the
> target_phys_addr_t both as start_addr and the offset.
> So, using int will make dirty tracking over 4G fail
> completely.
>
>
Applied, thanks.
> Of course we should be using qemu types in
> here, so please don't get me started on this. The whole
> file is wrong already ;)
>
These callbacks are called from libkvm, which doesn't know much about qemu.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-05-14 12:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-13 19:21 [PATCH] don't use a 32-bit bit type as offset argument Glauber Costa
2009-05-13 20:23 ` Ryan Harper
2009-05-13 20:36 ` Glauber Costa
2009-05-13 21:43 ` Anthony Liguori
2009-05-14 12:16 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox