From: Richard Henderson <richard.henderson@linaro.org>
To: Bin Meng <bmeng.cn@gmail.com>,
Alistair Francis <Alistair.Francis@wdc.com>,
Palmer Dabbelt <palmer@sifive.com>,
Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
Sagar Karandikar <sagark@eecs.berkeley.edu>,
QEMU devel <qemu-devel@nongnu.org>,
QEMU riscv <qemu-riscv@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] riscv: rv32: Root page table address can be larger than 32-bit
Date: Wed, 31 Jul 2019 10:35:49 -0700 [thread overview]
Message-ID: <581a0284-c658-265f-1b0f-6f4be5406cee@linaro.org> (raw)
In-Reply-To: <1564577101-29020-1-git-send-email-bmeng.cn@gmail.com>
On 7/31/19 5:45 AM, Bin Meng wrote:
> - target_ulong base;
> + hwaddr base;
...
> - target_ulong pte_addr = base + idx * ptesize;
> + hwaddr pte_addr = base + idx * ptesize;
I believe that you either need
base + (hwaddr)idx * ptesize
or change the type of idx to hwaddr above.
Otherwise the multiply overflows before it gets promoted with the add.
r~
next prev parent reply other threads:[~2019-07-31 17:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 12:45 [Qemu-devel] [PATCH] riscv: rv32: Root page table address can be larger than 32-bit Bin Meng
2019-07-31 17:35 ` Richard Henderson [this message]
2019-08-01 1:53 ` Bin Meng
2019-08-01 14:16 ` Richard Henderson
2019-08-01 14:57 ` Bin Meng
2019-08-07 20:55 ` Palmer Dabbelt
2019-08-08 1:49 ` Bin Meng
2019-08-08 2:49 ` [Qemu-devel] [PATCH v2] " Bin Meng
2019-08-10 1:49 ` Alistair Francis
2019-08-14 9:46 ` Bin Meng
2019-08-19 6:00 ` Bin Meng
2019-08-27 23:37 ` Palmer Dabbelt
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=581a0284-c658-265f-1b0f-6f4be5406cee@linaro.org \
--to=richard.henderson@linaro.org \
--cc=Alistair.Francis@wdc.com \
--cc=bmeng.cn@gmail.com \
--cc=kbastian@mail.uni-paderborn.de \
--cc=palmer@sifive.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=sagark@eecs.berkeley.edu \
/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).