[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/11] target/arm: Record the GP bit for a page
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 04/11] target/arm: Record the GP bit for a page in MemTxAttrs |
Date: |
Tue, 29 Jan 2019 09:55:14 +0000 |
On Mon, 28 Jan 2019 at 21:08, Richard Henderson
<address@hidden> wrote:
>
> On 1/22/19 5:26 AM, Peter Maydell wrote:
> >> + guarded |= extract64(descriptor, 50, 1); /* GP */
> >
> > Do we need to do the logical-OR here? Since this is a
> > block/page entry bit with no similar bit in the table
> > descriptors, there's no merging to be done (ie we
> > only execute this code once and 'guarded' will always
> > be 'false' before execution of the |=.)
>
> The document that I have has exactly one sentence about this, and does not
> specify whether the bit is akin to the page table attributes (which appear at
> every table level) or not.
Translation table descriptor formats come in four flavours:
* Invalid
* Table (which gives the address of the next level table)
* Block (which gives the address of a large lump of memory)
* Page (which gives the address of a page)
The GP bit documented to be in Block and Page entries, not
Table (which is how you've coded it).
> As written above, this will execute more than once.
I don't see how -- all the code paths forward from
"guarded |= extract64(descriptor, 50, 1);" reach a
"break" statement that terminates the loop, don't they?
thanks
-- PMM
[Qemu-devel] [PATCH 05/11] target/arm: Default handling of BTYPE during translation, Richard Henderson, 2019/01/10
[Qemu-devel] [PATCH 06/11] target/arm: Reset btype for direct branches and syscalls, Richard Henderson, 2019/01/10
[Qemu-devel] [PATCH 07/11] target/arm: Set btype for indirect branches, Richard Henderson, 2019/01/10