From: Peter Maydell <peter.maydell@linaro.org>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-trivial@nongnu.org, Hu Tao <hutao@cn.fujitsu.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] memory: fix a bug of detection of memory region collision
Date: Fri, 22 Mar 2013 12:50:00 +0000 [thread overview]
Message-ID: <CAFEAcA-jDhXjRs8FhMc8vmUouGPQwWptNw97HSQG3Lo_bHhsVw@mail.gmail.com> (raw)
In-Reply-To: <20130322122227.GB30604@stefanha-thinkpad.redhat.com>
On 22 March 2013 12:22, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> The int128_le() comparison below suggests that int128_gt() really should
> be int128_ge().
Agreed. It might be clearer to rephrase as:
AddrRange thisrange = addrrange_make(int128_make64(offset),
int128_make64(subregion->size));
QTAILQ_FOREACH(....) {
[...]
AddrRange otherrange = addrrange_make(int128_make64(other->addr),
int128_make64(other->size));
if (!addrrange_intersects(thisrange, otherrange)) {
continue;
}
[...]
}
(maybe with a new utility addrrange_make_64() that takes uint64_ts;
there are a few other places in memory.c that could use it.)
-- PMM
prev parent reply other threads:[~2013-03-22 12:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 6:32 [Qemu-devel] [PATCH] memory: fix a bug of detection of memory region collision Hu Tao
2013-03-22 12:22 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2013-03-22 12:50 ` Peter Maydell [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=CAFEAcA-jDhXjRs8FhMc8vmUouGPQwWptNw97HSQG3Lo_bHhsVw@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=hutao@cn.fujitsu.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@gmail.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).