From: Orit Wasserman <owasserm@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org,
quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH] Fix calculation of number of bits in the migration bitmap
Date: Wed, 31 Oct 2012 14:00:35 +0200 [thread overview]
Message-ID: <509112E3.3010703@redhat.com> (raw)
In-Reply-To: <50910A60.3030305@redhat.com>
On 10/31/2012 01:24 PM, Avi Kivity wrote:
> On 10/31/2012 01:19 PM, Orit Wasserman wrote:
>> The number of bits is off by one, for example if last_ram_offset
>> is 0x1000 (the guest has one page) we get 0 bits instead of 1.
>>
>> Signed-off-by: Orit Wasserman <owasserm@redhat.com>
>> ---
>> arch_init.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch_init.c b/arch_init.c
>> index b75a4c5..a80c3c8 100644
>> --- a/arch_init.c
>> +++ b/arch_init.c
>> @@ -565,7 +565,7 @@ static void reset_ram_globals(void)
>> static int ram_save_setup(QEMUFile *f, void *opaque)
>> {
>> RAMBlock *block;
>> - int64_t ram_pages = last_ram_offset() >> TARGET_PAGE_BITS;
>> + int64_t ram_pages = (last_ram_offset() >> TARGET_PAGE_BITS) + 1;
>>
>
> The original code calculates 1 for your example case.
You correct ...
sorry ...
>
>
next prev parent reply other threads:[~2012-10-31 12:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 11:19 [Qemu-devel] [PATCH] Fix calculation of number of bits in the migration bitmap Orit Wasserman
2012-10-31 11:24 ` Avi Kivity
2012-10-31 12:00 ` Orit Wasserman [this message]
2012-10-31 11:25 ` Peter Maydell
2012-10-31 12:04 ` Orit Wasserman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=509112E3.3010703@redhat.com \
--to=owasserm@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).