From: Alistair Francis <alistair23@gmail.com>
To: LIU Zhiwei <zhiwei_liu@c-sky.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <Alistair.Francis@wdc.com>,
Bin Meng <bin.meng@windriver.com>,
"open list:RISC-V" <qemu-riscv@nongnu.org>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v3 1/1] target/riscv: Fix PMP propagation for tlb
Date: Fri, 17 Dec 2021 10:37:23 +1000 [thread overview]
Message-ID: <CAKmqyKPiqLhw0zZK_f-8-WYdc4NYDgqrLTTE9_3k8YgX54F3LA@mail.gmail.com> (raw)
In-Reply-To: <CAKmqyKOD0JSY3FFBOt6L3=JwRVOsf35eCkpHrB4GvzsTUsOypw@mail.gmail.com>
On Wed, Dec 8, 2021 at 1:23 PM Alistair Francis <alistair23@gmail.com> wrote:
>
> On Tue, Nov 23, 2021 at 7:09 PM LIU Zhiwei <zhiwei_liu@c-sky.com> wrote:
> >
> > Only the pmp index that be checked by pmp_hart_has_privs can be used
> > by pmp_get_tlb_size to avoid an error pmp index.
> >
> > Before modification, we may use an error pmp index. For example,
> > we check address 0x4fc, and the size 0x4 in pmp_hart_has_privs. If there
> > is an pmp rule, valid range is [0x4fc, 0x500), then pmp_hart_has_privs
> > will return true;
> >
> > However, this checked pmp index is discarded as pmp_hart_has_privs
> > return bool value. In pmp_is_range_in_tlb, it will traverse all pmp
> > rules. The tlb_sa will be 0x0, and tlb_ea will be 0x4fff. If there is
> > a pmp rule [0x10, 0x4]. It will be misused as it is legal in
> > pmp_get_tlb_size.
> >
> > Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
>
> Thanks!
>
> Applied to riscv-to-apply.next
This patch causes lots of Linux boot failures. I see messages like this:
Invalid write at addr 0x22048, size 8, region '(null)', reason: rejected
from QEMU and the guest fails to start.
Alistair
next prev parent reply other threads:[~2021-12-17 0:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 9:09 [PATCH v3 1/1] target/riscv: Fix PMP propagation for tlb LIU Zhiwei
2021-12-08 1:04 ` Alistair Francis
2021-12-08 3:23 ` Alistair Francis
2021-12-17 0:37 ` Alistair Francis [this message]
2021-12-17 3:06 ` LIU Zhiwei
2021-12-17 3:28 ` LIU Zhiwei
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=CAKmqyKPiqLhw0zZK_f-8-WYdc4NYDgqrLTTE9_3k8YgX54F3LA@mail.gmail.com \
--to=alistair23@gmail.com \
--cc=Alistair.Francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=zhiwei_liu@c-sky.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).