From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] memory: fix 128 arithmetic in info mtree
Date: Wed, 25 Sep 2013 13:27:11 +0200 [thread overview]
Message-ID: <5242C88F.4080803@redhat.com> (raw)
In-Reply-To: <1377850238-10270-1-git-send-email-aik@ozlabs.ru>
Il 30/08/2013 10:10, Alexey Kardashevskiy ha scritto:
> mtree_print_mr() calls int128_get64() in 3 places but only 2 places
> handle 2^64 correctly.
>
> This fixes the third call of int128_get64().
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> memory.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/memory.c b/memory.c
> index ffedde7..93f2995 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -1816,7 +1816,9 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
> mr->alias->name,
> mr->alias_offset,
> mr->alias_offset
> - + (hwaddr)int128_get64(mr->size) - 1);
> + + (int128_nz(mr->size) ?
> + (hwaddr)int128_get64(int128_sub(mr->size,
> + int128_one())) : 0));
> } else {
> mon_printf(f,
> TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d, %c%c): %s\n",
>
Applied to my iommu branch, which I should eventually rename. :)
Thanks,
Paolo
prev parent reply other threads:[~2013-09-25 11:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-30 8:10 [Qemu-devel] [PATCH] memory: fix 128 arithmetic in info mtree Alexey Kardashevskiy
2013-09-10 4:19 ` Alexey Kardashevskiy
2013-09-25 10:46 ` Alexey Kardashevskiy
2013-09-25 11:27 ` Paolo Bonzini [this message]
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=5242C88F.4080803@redhat.com \
--to=pbonzini@redhat.com \
--cc=aik@ozlabs.ru \
--cc=qemu-devel@nongnu.org \
/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).