Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-15 Thread David Gibson
On Tue, Jun 15, 2021 at 09:25:06AM -0300, Bruno Piazera Larsen wrote: > > On 15/06/2021 00:20, Richard Henderson wrote: > > On 6/14/21 6:41 PM, David Gibson wrote: > > > I think move these to mmu-book3s-v3.h, since they're correct for both > > > the radix and hash sides of the modern book3s mmu. >

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-15 Thread Cédric Le Goater
On 6/15/21 4:57 PM, Bruno Piazera Larsen wrote: > > On 15/06/2021 10:57, Cédric Le Goater wrote: >> On 6/14/21 9:16 PM, Bruno Larsen (billionai) wrote: >>> Based-on: <20210518201146.794854-1-richard.hender...@linaro.org> >>> >>> This commit attempts to fix the first bug mentioned by Richard Hend

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-15 Thread Bruno Piazera Larsen
On 15/06/2021 10:57, Cédric Le Goater wrote: On 6/14/21 9:16 PM, Bruno Larsen (billionai) wrote: Based-on: <20210518201146.794854-1-richard.hender...@linaro.org> This commit attempts to fix the first bug mentioned by Richard Henderson in https://lists.nongnu.org/archive/html/qemu-devel/2021-05

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-15 Thread Philippe Mathieu-Daudé
On 6/15/21 3:57 PM, Cédric Le Goater wrote: > On 6/14/21 9:16 PM, Bruno Larsen (billionai) wrote: >> Based-on: <20210518201146.794854-1-richard.hender...@linaro.org> >> >> This commit attempts to fix the first bug mentioned by Richard Henderson in >> https://lists.nongnu.org/archive/html/qemu-devel

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-15 Thread Cédric Le Goater
On 6/14/21 9:16 PM, Bruno Larsen (billionai) wrote: > Based-on: <20210518201146.794854-1-richard.hender...@linaro.org> > > This commit attempts to fix the first bug mentioned by Richard Henderson in > https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg06247.html > > To sumarize the bug h

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-15 Thread Bruno Piazera Larsen
On 15/06/2021 00:20, Richard Henderson wrote: On 6/14/21 6:41 PM, David Gibson wrote: I think move these to mmu-book3s-v3.h, since they're correct for both the radix and hash sides of the modern book3s mmu. They're also correct for all non-booke mmus, e.g. hash32 and 6xx, which is why I reco

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-14 Thread Richard Henderson
On 6/14/21 6:41 PM, David Gibson wrote: I think move these to mmu-book3s-v3.h, since they're correct for both the radix and hash sides of the modern book3s mmu. They're also correct for all non-booke mmus, e.g. hash32 and 6xx, which is why I recommended internal.h (or some new mmu-internal.h).

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-14 Thread David Gibson
On Mon, Jun 14, 2021 at 06:04:13PM -0300, Fabiano Rosas wrote: > "Bruno Larsen (billionai)" writes: > > > +/* > > + * These correspond to the mmu_idx values computed in > > + * hreg_compute_hflags_value. See the tables therein > > + */ > > +static inline bool mmuidx_pr(int idx) { return !(idx & 1

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-14 Thread David Gibson
On Mon, Jun 14, 2021 at 04:16:29PM -0300, Bruno Larsen (billionai) wrote: > Based-on: <20210518201146.794854-1-richard.hender...@linaro.org> > > This commit attempts to fix the first bug mentioned by Richard Henderson in > https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg06247.html > >

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-14 Thread Fabiano Rosas
"Bruno Larsen (billionai)" writes: > +/* > + * These correspond to the mmu_idx values computed in > + * hreg_compute_hflags_value. See the tables therein > + */ > +static inline bool mmuidx_pr(int idx) { return !(idx & 1); } > +/* > + * If we want to use these macros for hash-style MMUs, we need

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-14 Thread Greg Kurz
On Mon, 14 Jun 2021 16:16:29 -0300 "Bruno Larsen (billionai)" wrote: > Based-on: <20210518201146.794854-1-richard.hender...@linaro.org> > > This commit attempts to fix the first bug mentioned by Richard Henderson in > https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg06247.html > > To

[PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus

2021-06-14 Thread Bruno Larsen (billionai)
Based-on: <20210518201146.794854-1-richard.hender...@linaro.org> This commit attempts to fix the first bug mentioned by Richard Henderson in https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg06247.html To sumarize the bug here, when radix-style mmus are translating an address, they migh