Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-26 Thread David Gibson
On Fri, Apr 23, 2021 at 10:28:14AM -0300, Fabiano Rosas wrote: > David Gibson writes: > > > On Thu, Apr 22, 2021 at 04:35:34PM -0300, Fabiano Rosas wrote: > >> Bruno Piazera Larsen writes: > >> > >> >> > You are correct! I've just tweaked the code that defines spr_register > >> >> > and > >> >

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-23 Thread Fabiano Rosas
David Gibson writes: > On Thu, Apr 22, 2021 at 04:35:34PM -0300, Fabiano Rosas wrote: >> Bruno Piazera Larsen writes: >> >> >> > You are correct! I've just tweaked the code that defines spr_register >> >> > and >> >> > it should be working now. I'm still working in splitting the SPR >> >> > f

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-22 Thread David Gibson
On Thu, Apr 22, 2021 at 04:35:34PM -0300, Fabiano Rosas wrote: > Bruno Piazera Larsen writes: > > >> > You are correct! I've just tweaked the code that defines spr_register and > >> > it should be working now. I'm still working in splitting the SPR > >> > functions > >> > from translate_init, si

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-22 Thread Fabiano Rosas
Bruno Piazera Larsen writes: >> > You are correct! I've just tweaked the code that defines spr_register and >> > it should be working now. I'm still working in splitting the SPR functions >> > from translate_init, since I think it would make it easier to prepare the >> > !TCG case and for adding

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-22 Thread Bruno Piazera Larsen
org; lagar...@br.ibm.com; Lucas Mateus Martins Araujo e Castro; Fernando Eckhardt Valle; qemu-...@nongnu.org; Andre Fernando da Silva; Matheus Kowalczuk Ferst; Luis Fernando Fujita Pires Assunto: Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg On Tue, Apr 20, 2021 at 07:02:36PM +

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-20 Thread David Gibson
On Tue, Apr 20, 2021 at 07:02:36PM +, Bruno Piazera Larsen wrote: > > > What I was doing was to only register the spr once, and use the > > > accel-specific functions to set the relevant attributes, so spr_common > > > wouldn't need to where (and if) spr_read_* exists or not. > > > Would this w

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-20 Thread Bruno Piazera Larsen
> > What I was doing was to only register the spr once, and use the > > accel-specific functions to set the relevant attributes, so spr_common > > wouldn't need to where (and if) spr_read_* exists or not. > > Would this work? > > > > Just ignoring the read and write functions means we still need >

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-19 Thread David Gibson
On Mon, Apr 19, 2021 at 02:40:35PM +, Bruno Piazera Larsen wrote: > > > > * move gen_write_xer and gen_read_xer into cpu_init.c, as they're > > > > used for some sprs, and whatever needs to be moved with it > > > > > > I'd leave them where they are currently. Instead what I think we should > >

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-19 Thread Bruno Piazera Larsen
> > > * move gen_write_xer and gen_read_xer into cpu_init.c, as they're > > > used for some sprs, and whatever needs to be moved with it > > > > I'd leave them where they are currently. Instead what I think we should > > do is to find a way to not need the uea/oea/hea|read/write callbacks > > with

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-18 Thread David Gibson
o.org.br/disclaimer.html> > > > De: David Gibson > Enviadas: Terça-feira, 13 de Abril de 2021 03:40 > Para: Bruno Piazera Larsen > Cc: Fabiano Rosas; Thomas Huth; qemu-devel@nongnu.org; Luis Fernando Fujita > Pires; Andre Fernando da Silva; Luca

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-18 Thread David Gibson
On Tue, Apr 13, 2021 at 06:38:57PM -0300, Fabiano Rosas wrote: > Bruno Piazera Larsen writes: > > >> I'm actually not sure if we'll want translate_init.c for !tcg builds. > >> It's *primarily* for TCG, but we still need at least some of the cpu > >> state structure for KVM, and some of that is in

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-14 Thread Richard Henderson
On 4/14/21 1:07 PM, Bruno Piazera Larsen wrote: I think it would be worth moving all of the SPR code out to a separate file, apart from cpu_init.c.  There's a lot of it.  And, yes, I would move everything that you can that is related out of translate.c. Yeah, now that I look at the SPR code, I

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-14 Thread Bruno Piazera Larsen
> > The trivial path is to: > > * rename translate_init.c.inc to cpu_init.c (since it has to do with > > initial definitions for CPUs, and it's not related to translating > > anymore); > > Anymore? You mean after you've moved out everything related to > create_ppc_opcodes? Sure. yeah, that. Als

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-14 Thread Fabiano Rosas
Bruno Piazera Larsen writes: >> > * move gen_write_xer and gen_read_xer into cpu_init.c, as they're >> > used for some sprs, and whatever needs to be moved with it >> >> I'd leave them where they are currently. Instead what I think we should >> do is to find a way to not need the uea/oea/hea|read

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-14 Thread Richard Henderson
On 4/13/21 10:43 AM, Bruno Piazera Larsen wrote: The trivial path is to: * rename translate_init.c.inc to cpu_init.c (since it has to do with initial definitions for CPUs, and it's not related to translating anymore); Anymore? You mean after you've moved out everything related to create_ppc_o

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-14 Thread Bruno Piazera Larsen
> > * move gen_write_xer and gen_read_xer into cpu_init.c, as they're > > used for some sprs, and whatever needs to be moved with it > > I'd leave them where they are currently. Instead what I think we should > do is to find a way to not need the uea/oea/hea|read/write callbacks > with KVM. so we'

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-13 Thread Fabiano Rosas
Bruno Piazera Larsen writes: >> I'm actually not sure if we'll want translate_init.c for !tcg builds. >> It's *primarily* for TCG, but we still need at least some of the cpu >> state structure for KVM, and some of that is initialized in >> translate_init. >> >> I think it will probably make more

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-13 Thread Bruno Piazera Larsen
; Thomas Huth; qemu-devel@nongnu.org; Luis Fernando Fujita Pires; Andre Fernando da Silva; Lucas Mateus Martins Araujo e Castro; Fernando Eckhardt Valle; qemu-...@nongnu.org; lagar...@br.ibm.com; Matheus Kowalczuk Ferst Assunto: Re: [PATCH 1/4] target/ppc: Code motion required to build disabling t

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-13 Thread David Gibson
On Mon, Apr 12, 2021 at 12:05:31PM +, Bruno Piazera Larsen wrote: > > A general advice for this whole series is: make sure you add in some > > words explaining why you decided to make a particular change. It will be > > much easier to review if we know what were the logical steps leading to > >

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-12 Thread Fabiano Rosas
Bruno Piazera Larsen writes: >> > This commit does the necessary code motion from translate_init.c.inc >> >> For instance, I don't immediately see why these changes are necessary. I >> see that translate_init.c.inc already has some `#ifdef CONFIG_TCG`, so >> why do we need to move a bunch of code

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-12 Thread Bruno Piazera Larsen
> A general advice for this whole series is: make sure you add in some > words explaining why you decided to make a particular change. It will be > much easier to review if we know what were the logical steps leading to > the change. Fair point, I should've thought about that. > > This commit doe

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-11 Thread David Gibson
On Fri, Apr 09, 2021 at 04:48:41PM -0300, Fabiano Rosas wrote: > "Bruno Larsen (billionai)" writes: > > A general advice for this whole series is: make sure you add in some > words explaining why you decided to make a particular change. It will be > much easier to review if we know what were the

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-09 Thread Fabiano Rosas
"Bruno Larsen (billionai)" writes: A general advice for this whole series is: make sure you add in some words explaining why you decided to make a particular change. It will be much easier to review if we know what were the logical steps leading to the change. > This commit does the necessary co