Re: [PATCH] Revert "cputlb: Restrict SavedIOTLB to system emulation"

2023-06-22 Thread Thiago Jung Bauermann
Hello, Philippe Mathieu-Daudé writes: > On 21/6/23 11:39, Philippe Mathieu-Daudé wrote: >> On 21/6/23 07:19, Richard Henderson wrote: >>> On 6/20/23 19:57, Peter Maydell wrote: This manifests specifically in 'make check-tcg' failing, because code in cpus-common.c that sets up the

Re: [PULL 00/30] ppc-for-5.2 queue 20200904

2020-09-08 Thread Thiago Jung Bauermann
>> This looks like the correct fix indeed :) >> (Maybe worth adding a comment around). > > Agreed on both counts. > >> Thanks for investigating! > > And here as well :) Thank you very much for investigating and fixing this problem, Laurent! Sorry for not working on this issue. I was out on an extended weekend and just came back. -- Thiago Jung Bauermann IBM Linux Technology Center

Re: [PATCH v7 4/8] ppc/e500: Use start-powered-off CPUState property

2020-09-01 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 8/26/20 7:55 AM, Thiago Jung Bauermann wrote: >> Instead of setting CPUState::halted to 1 in ppce500_cpu_reset_sec(), use >> the start-powered-off property which makes cpu_common_reset() initialize it >> to 1 in common code. >&g

Re: [PATCH v7 0/8] Generalize start-powered-off property from ARM

2020-08-31 Thread Thiago Jung Bauermann
David Gibson writes: > On Wed, Aug 26, 2020 at 02:55:27AM -0300, Thiago Jung Bauermann wrote: >> This version fixes `make check` failures in ppc/e500.c, mips/cps.c and >> sparc/sun4m.c. This was done by moving the qdev_realize_and_unref() call as >> close as possible to

[PATCH v7 8/8] target/s390x: Use start-powered-off CPUState property

2020-08-26 Thread Thiago Jung Bauermann
wed-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- target/s390x/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 08eb674d22..73d7d6007e 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -291,7 +29

[PATCH v7 5/8] mips/cps: Use start-powered-off CPUState property

2020-08-26 Thread Thiago Jung Bauermann
the CPU and it's not possible to set a property after the object is realized. Signed-off-by: Thiago Jung Bauermann --- hw/mips/cps.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 615e1a1ad2..23c0f87e41 100644 --- a/hw/mips/cps.c

[PATCH v7 7/8] sparc/sun4m: Use start-powered-off CPUState property

2020-08-26 Thread Thiago Jung Bauermann
CPU and it's not possible to set a property after the object is realized. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4

[PATCH v7 6/8] sparc/sun4m: Don't set cs->halted = 0 in main_cpu_reset()

2020-08-25 Thread Thiago Jung Bauermann
We rely on cpu_common_reset() to set cs->halted to 0, it's redundant to do it in main_cpu_reset(). Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index cf7dfa4af5..7484aa4438 100644 --- a/hw/sp

[PATCH v7 2/8] target/arm: Move setting of CPU halted state to generic code

2020-08-25 Thread Thiago Jung Bauermann
This change is in a separate patch because it's not so obvious that it won't cause a regression. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- hw/core/cpu.c| 2 +- target/arm

[PATCH v7 4/8] ppc/e500: Use start-powered-off CPUState property

2020-08-25 Thread Thiago Jung Bauermann
the CPU and it's not possible to set a property after the object is realized. Signed-off-by: Thiago Jung Bauermann --- hw/ppc/e500.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index ab9884e315..ae39b9358e 100644 --- a/hw/ppc

[PATCH v7 0/8] Generalize start-powered-off property from ARM

2020-08-25 Thread Thiago Jung Bauermann
et() function for main and secondary CPUs" - Dropped. Patch "target/s390x: Use start-powered-off CPUState property" - Set the CPUState::start_powered_off variable directly rather than using object_property_set_bool(). Suggested by Philippe. - Mention in the commit message Eduardo's observati

[PATCH v7 1/8] target/arm: Move start-powered-off property to generic CPUState

2020-08-25 Thread Thiago Jung Bauermann
it wouldn't be a trivial change. This change should not cause any change in behavior. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- exec.c| 1 + include/hw/core/cpu.h | 4

[PATCH v7 3/8] ppc/spapr: Use start-powered-off CPUState property

2020-08-25 Thread Thiago Jung Bauermann
-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- hw/ppc/spapr_cpu_core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index c4f47dcc04..2125fdac34 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c

Re: [PATCH v6 4/8] ppc/e500: Use start-powered-off CPUState property

2020-08-25 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 8/22/20 10:59 AM, Cédric Le Goater wrote: >> Hello, >> >> On 8/19/20 6:43 PM, Thiago Jung Bauermann wrote: >>> Instead of setting CPUState::halted to 1 in ppce500_cpu_reset_sec(), use >>> the start-powered-of

Re: [PATCH v6 6/8] sparc/sun4m: Remove main_cpu_reset()

2020-08-25 Thread Thiago Jung Bauermann
Thiago Jung Bauermann writes: > We rely on cpu_common_reset() to set cs->halted to 0, so main_cpu_reset() > is pointless. > > Suggested-by: Philippe Mathieu-Daudé > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: David Gibson > Signed-off-by: Thiago Jung Baue

Re: [PATCH v6 4/8] ppc/e500: Use start-powered-off CPUState property

2020-08-24 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 8/22/20 10:59 AM, Cédric Le Goater wrote: >> Hello, >> >> On 8/19/20 6:43 PM, Thiago Jung Bauermann wrote: >>> Instead of setting CPUState::halted to 1 in ppce500_cpu_reset_sec(), use >>> the start-powered-of

Re: [PATCH v6 4/8] ppc/e500: Use start-powered-off CPUState property

2020-08-24 Thread Thiago Jung Bauermann
David Gibson writes: > On Sat, Aug 22, 2020 at 10:59:56AM +0200, Cédric Le Goater wrote: >> Hello, >> >> On 8/19/20 6:43 PM, Thiago Jung Bauermann wrote: >> > Instead of setting CPUState::halted to 1 in ppce500_cpu_reset_sec(), use >> > the

Re: [PATCH v6 0/8] Generalize start-powered-off property from ARM

2020-08-19 Thread Thiago Jung Bauermann
David Gibson writes: > On Wed, Aug 19, 2020 at 01:42:58PM -0300, Thiago Jung Bauermann wrote: >> This version has one small fix in patch 7, and adds Philippe's Reviewed-bys. >> >> Applies cleanly on dgibson/ppc-for-5.2. >> >> Original cover le

Re: [PATCH v6 7/8] sparc/sun4m: Use start-powered-off CPUState property

2020-08-19 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 8/19/20 6:43 PM, Thiago Jung Bauermann wrote: >> Instead of setting CPUState::halted to 1 in secondary_cpu_reset(), use the >> start-powered-off property which makes cpu_common_reset() initialize it >> to 1 in common co

[PATCH v6 5/8] mips/cps: Use start-powered-off CPUState property

2020-08-19 Thread Thiago Jung Bauermann
the CPU and it's not possible to set a property after the object is realized. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/mips/cps.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 615e1a1ad2

[PATCH v6 8/8] target/s390x: Use start-powered-off CPUState property

2020-08-19 Thread Thiago Jung Bauermann
wed-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- target/s390x/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 08eb674d22..73d7d6007e 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -291,7 +29

[PATCH v6 7/8] sparc/sun4m: Use start-powered-off CPUState property

2020-08-19 Thread Thiago Jung Bauermann
ter the object is realized. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 22c51dac8a..23991ccd47 100644 --- a/hw/sparc/sun4

[PATCH v6 4/8] ppc/e500: Use start-powered-off CPUState property

2020-08-19 Thread Thiago Jung Bauermann
the CPU and it's not possible to set a property after the object is realized. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/ppc/e500.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index

[PATCH v6 0/8] Generalize start-powered-off property from ARM

2020-08-19 Thread Thiago Jung Bauermann
and secondary CPUs" - Dropped. Patch "target/s390x: Use start-powered-off CPUState property" - Set the CPUState::start_powered_off variable directly rather than using object_property_set_bool(). Suggested by Philippe. - Mention in the commit message Eduardo's observation that before

[PATCH v6 3/8] ppc/spapr: Use start-powered-off CPUState property

2020-08-19 Thread Thiago Jung Bauermann
-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- hw/ppc/spapr_cpu_core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index c4f47dcc04..2125fdac34 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c

[PATCH v6 6/8] sparc/sun4m: Remove main_cpu_reset()

2020-08-19 Thread Thiago Jung Bauermann
We rely on cpu_common_reset() to set cs->halted to 0, so main_cpu_reset() is pointless. Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 13 + 1 file changed, 1 insert

[PATCH v6 2/8] target/arm: Move setting of CPU halted state to generic code

2020-08-19 Thread Thiago Jung Bauermann
This change is in a separate patch because it's not so obvious that it won't cause a regression. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- hw/core/cpu.c| 2 +- target/arm

[PATCH v6 1/8] target/arm: Move start-powered-off property to generic CPUState

2020-08-19 Thread Thiago Jung Bauermann
it wouldn't be a trivial change. This change should not cause any change in behavior. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- exec.c| 1 + include/hw/core/cpu.h | 4

Re: [PATCH v5 7/8] sparc/sun4m: Use start-powered-off CPUState property

2020-08-19 Thread Thiago Jung Bauermann
Hi Philippe, Philippe Mathieu-Daudé writes: > On 8/19/20 4:42 AM, Thiago Jung Bauermann wrote: >> Instead of setting CPUState::halted to 1 in secondary_cpu_reset(), use the >> start-powered-off property which makes cpu_common_reset() initialize it >> to 1 in common c

[PATCH v5 5/8] mips/cps: Use start-powered-off CPUState property

2020-08-18 Thread Thiago Jung Bauermann
the CPU and it's not possible to set a property after the object is realized. Signed-off-by: Thiago Jung Bauermann --- hw/mips/cps.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 615e1a1ad2..4a98cf2287 100644 --- a/hw/mips/cps.c

[PATCH v5 7/8] sparc/sun4m: Use start-powered-off CPUState property

2020-08-18 Thread Thiago Jung Bauermann
ter the object is realized. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 22c51dac8a..1925f415e7 100644 --- a/hw/sparc/sun4

[PATCH v5 6/8] sparc/sun4m: Remove main_cpu_reset()

2020-08-18 Thread Thiago Jung Bauermann
We rely on cpu_common_reset() to set cs->halted to 0, so main_cpu_reset() is pointless. Suggested-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a

[PATCH v5 4/8] ppc/e500: Use start-powered-off CPUState property

2020-08-18 Thread Thiago Jung Bauermann
the CPU and it's not possible to set a property after the object is realized. Signed-off-by: Thiago Jung Bauermann --- hw/ppc/e500.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index ab9884e315..d7b803ef26 100644 --- a/hw/ppc

[PATCH v5 0/8] Generalize start-powered-off property from ARM

2020-08-18 Thread Thiago Jung Bauermann
y rather than using object_property_set_bool(). Suggested by Philippe. - Mention in the commit message Eduardo's observation that before this patch, the code didn't set cs->halted on reset. Thiago Jung Bauermann (8): target/arm: Move start-powered-off property to generic CPUState target

[PATCH v5 1/8] target/arm: Move start-powered-off property to generic CPUState

2020-08-18 Thread Thiago Jung Bauermann
it wouldn't be a trivial change. This change should not cause any change in behavior. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- exec.c| 1 + include/hw/core/cpu.h | 4

[PATCH v5 8/8] target/s390x: Use start-powered-off CPUState property

2020-08-18 Thread Thiago Jung Bauermann
off-by: Thiago Jung Bauermann --- target/s390x/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 08eb674d22..73d7d6007e 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -291,7 +291,7 @@ static void s390_cpu_initfn(Obj

[PATCH v5 2/8] target/arm: Move setting of CPU halted state to generic code

2020-08-18 Thread Thiago Jung Bauermann
This change is in a separate patch because it's not so obvious that it won't cause a regression. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- hw/core/cpu.c| 2 +- target/arm

[PATCH v5 3/8] ppc/spapr: Use start-powered-off CPUState property

2020-08-18 Thread Thiago Jung Bauermann
-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- hw/ppc/spapr_cpu_core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index c4f47dcc04..2125fdac34 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c

Re: [PATCH v4 5/8] mips/cps: Use start-powered-off CPUState property

2020-08-18 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 8/18/20 5:33 AM, Thiago Jung Bauermann wrote: >> Instead of setting CPUState::halted to 1 in main_cpu_reset(), use the >> start-powered-off property which makes cpu_common_reset() initialize it >> to 1 in common code. >> >> A

Re: [PATCH v4 4/8] ppc/e500: Use start-powered-off CPUState property

2020-08-18 Thread Thiago Jung Bauermann
Thiago Jung Bauermann writes: > Hello Philippe, > > Thanks for your review. > > Philippe Mathieu-Daudé writes: > >> On 8/18/20 9:22 AM, Philippe Mathieu-Daudé wrote: >>>> @@ -897,6 +895,19 @@ void ppce500_init(MachineState *machine) >>>>

Re: [PATCH v4 4/8] ppc/e500: Use start-powered-off CPUState property

2020-08-18 Thread Thiago Jung Bauermann
Hello Philippe, Thanks for your review. Philippe Mathieu-Daudé writes: > On 8/18/20 9:22 AM, Philippe Mathieu-Daudé wrote: >> On 8/18/20 5:33 AM, Thiago Jung Bauermann wrote: >>> Instead of setting CPUState::halted to 1 in ppce500_cpu_reset_sec(), use >>> the start

Re: [PATCH v4 4/8] ppc/e500: Use start-powered-off CPUState property

2020-08-18 Thread Thiago Jung Bauermann
Hi Igor, Thank you for reviewing these patches, and the tips you provided here and on other messages on how to fix the refcount issues. Igor Mammedov writes: > On Tue, 18 Aug 2020 00:33:19 -0300 > Thiago Jung Bauermann wrote: > > [...] > >> Also change creation of CPU o

[PATCH v4 8/8] target/s390x: Use start-powered-off CPUState property

2020-08-17 Thread Thiago Jung Bauermann
off-by: Thiago Jung Bauermann --- target/s390x/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 08eb674d22..73d7d6007e 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -291,7 +291,7 @@ static void s390_cpu_initfn(Obj

[PATCH v4 7/8] sparc/sun4m: Use start-powered-off CPUState property

2020-08-17 Thread Thiago Jung Bauermann
ect is realized. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index f1d92df781..41a7c5fa86 100644 --- a/hw/sparc/sun4

[PATCH v4 6/8] sparc/sun4m: Remove main_cpu_reset()

2020-08-17 Thread Thiago Jung Bauermann
We rely on cpu_common_reset() to set cs->halted to 0, so main_cpu_reset() is pointless. Suggested-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a

[PATCH v4 5/8] mips/cps: Use start-powered-off CPUState property

2020-08-17 Thread Thiago Jung Bauermann
not possible to set a property after the object is realized. Signed-off-by: Thiago Jung Bauermann --- hw/mips/cps.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 615e1a1ad2..be85357dc0 100644 --- a/hw/mips/cps.c +++ b/hw

[PATCH v4 1/8] target/arm: Move start-powered-off property to generic CPUState

2020-08-17 Thread Thiago Jung Bauermann
it wouldn't be a trivial change. This change should not cause any change in behavior. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- exec.c| 1 + include/hw/core/cpu.h | 4

[PATCH v4 4/8] ppc/e500: Use start-powered-off CPUState property

2020-08-17 Thread Thiago Jung Bauermann
and it's not possible to set a property after the object is realized. Signed-off-by: Thiago Jung Bauermann --- hw/ppc/e500.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index ab9884e315..0077aca74d 100644 --- a/hw/ppc/e500

[PATCH v4 2/8] target/arm: Move setting of CPU halted state to generic code

2020-08-17 Thread Thiago Jung Bauermann
This change is in a separate patch because it's not so obvious that it won't cause a regression. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- hw/core/cpu.c| 2 +- target/arm

[PATCH v4 3/8] ppc/spapr: Use start-powered-off CPUState property

2020-08-17 Thread Thiago Jung Bauermann
-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann --- hw/ppc/spapr_cpu_core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index c4f47dcc04..2125fdac34 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c

[PATCH v4 0/8] Generalize start-powered-off property from ARM

2020-08-17 Thread Thiago Jung Bauermann
y" - Set the CPUState::start_powered_off variable directly rather than using object_property_set_bool(). Suggested by Philippe. - Mention in the commit message Eduardo's observation that before this patch, the code didn't set cs->halted on reset. Thiago Jung Bauermann (8): target/arm: Move star

Re: [PATCH v3 0/8] Generalize start-powered-off property from ARM

2020-08-17 Thread Thiago Jung Bauermann
David Gibson writes: > On Mon, Aug 17, 2020 at 07:24:43AM +0200, Philippe Mathieu-Daudé wrote: >> On 8/17/20 6:47 AM, David Gibson wrote: >> > On Wed, Jul 22, 2020 at 11:56:49PM -0300, Thiago Jung Bauermann wrote: >> >> The ARM code has a start-powered

Re: [RFC PATCH v3 8/8] target/s390x: Use start-powered-off CPUState property

2020-08-12 Thread Thiago Jung Bauermann
Cornelia Huck writes: > On Thu, 30 Jul 2020 11:45:41 +0200 > Cornelia Huck wrote: > >> On Tue, 28 Jul 2020 21:51:33 -0300 >> Thiago Jung Bauermann wrote: >> >> > Hi, >> > >> > Cornelia Huck writes: >> > >> >

Re: [PATCH v3 0/8] Generalize start-powered-off property from ARM

2020-08-05 Thread Thiago Jung Bauermann
Peter Maydell writes: > On Wed, 5 Aug 2020 at 18:01, Thiago Jung Bauermann > wrote: >> Any news on this? Is there something I should be doing? I saw -rc3 today >> but not these patches. > > Sorry, you've missed the bus for 5.1 at this point. I'd assumed

Re: [PATCH v3 0/8] Generalize start-powered-off property from ARM

2020-08-05 Thread Thiago Jung Bauermann
Thiago Jung Bauermann writes: > Philippe Mathieu-Daudé writes: > >> Le jeu. 30 juil. 2020 03:00, David Gibson a >> écrit : >> >>> On Tue, Jul 28, 2020 at 09:56:36PM -0300, Thiago Jung Bauermann wrote: >>> > >>> > Thiago Jung Bauerman

Re: [PATCH v3 0/8] Generalize start-powered-off property from ARM

2020-07-30 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > Le jeu. 30 juil. 2020 03:00, David Gibson a > écrit : > >> On Tue, Jul 28, 2020 at 09:56:36PM -0300, Thiago Jung Bauermann wrote: >> > >> > Thiago Jung Bauermann writes: >> > >> > > The ARM

Re: [PATCH v3 0/8] Generalize start-powered-off property from ARM

2020-07-28 Thread Thiago Jung Bauermann
Thiago Jung Bauermann writes: > The ARM code has a start-powered-off property in ARMCPU, which is a > subclass of CPUState. This property causes arm_cpu_reset() to set > CPUState::halted to 1, signalling that the CPU should start in a halted > state. Other architectures also hav

Re: [RFC PATCH v3 8/8] target/s390x: Use start-powered-off CPUState property

2020-07-28 Thread Thiago Jung Bauermann
Hi, Cornelia Huck writes: > On Wed, 22 Jul 2020 23:56:57 -0300 > Thiago Jung Bauermann wrote: > >> Instead of setting CPUState::halted to 1 in s390_cpu_initfn(), use the >> start-powered-off property which makes cpu_common_reset() initialize it >> to 1

Re: [PATCH v3 3/8] ppc/spapr: Use start-powered-off CPUState property

2020-07-28 Thread Thiago Jung Bauermann
Greg Kurz writes: > On Wed, 22 Jul 2020 23:56:52 -0300 > Thiago Jung Bauermann wrote: > >> PowerPC sPAPR CPUs start in the halted state, and spapr_reset_vcpu() >> attempts to implement this by setting CPUState::halted to 1. But that's too >> late for the case of h

Re: [PATCH v3 1/8] target/arm: Move start-powered-off property to generic CPUState

2020-07-28 Thread Thiago Jung Bauermann
Greg Kurz writes: > On Thu, 23 Jul 2020 13:06:09 +1000 > David Gibson wrote: > >> On Wed, Jul 22, 2020 at 11:56:50PM -0300, Thiago Jung Bauermann wrote: >> > There are other platforms which also have CPUs that start powered off, so >> > generalize the start-po

Re: [PATCH v3 1/8] target/arm: Move start-powered-off property to generic CPUState

2020-07-22 Thread Thiago Jung Bauermann
David Gibson writes: > On Wed, Jul 22, 2020 at 11:56:50PM -0300, Thiago Jung Bauermann wrote: >> There are other platforms which also have CPUs that start powered off, so >> generalize the start-powered-off property so that it can be used by them. >> >> Not

Re: [PATCH v2 1/9] target/arm: Move start-powered-off property to generic CPUState

2020-07-22 Thread Thiago Jung Bauermann
Hello David, David Gibson writes: > On Wed, Jul 22, 2020 at 12:50:08AM -0300, Thiago Jung Bauermann wrote: >> There are other platforms which also have CPUs that start powered off, so >> generalize the start-powered-off property so that it can be used by them. >> >

[PATCH v3 7/8] sparc/sun4m: Use start-powered-off CPUState property

2020-07-22 Thread Thiago Jung Bauermann
ems out of place when compared to similar code in other architectures (e.g., ppce500_init() in hw/ppc/e500.c). Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) NB: I was only a

[PATCH v3 6/8] sparc/sun4m: Remove main_cpu_reset()

2020-07-22 Thread Thiago Jung Bauermann
We rely on cpu_common_reset() to set cs->halted to 0, so main_cpu_reset() is pointless. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) NB: I was only able to t

[RFC PATCH v3 8/8] target/s390x: Use start-powered-off CPUState property

2020-07-22 Thread Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in s390_cpu_initfn(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Note that this changes behavior by setting cs->halted to 1 on reset, which didn't happen before. Signed-off-by: Thiago J

[PATCH v3 3/8] ppc/spapr: Use start-powered-off CPUState property

2020-07-22 Thread Thiago Jung Bauermann
causes it to see a stray vCPU that doesn't belong to any guest. Fix by setting the start-powered-off CPUState property in spapr_create_vcpu(), which makes cpu_common_reset() initialize CPUState::halted to 1 at an earlier moment. Suggested-by: Eduardo Habkost Signed-off-by: Thiago Jung Bauermann

[PATCH v3 4/8] ppc/e500: Use start-powered-off CPUState property

2020-07-22 Thread Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in ppce500_cpu_reset_sec(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/ppc/e500.c | 10 +++--- 1 file changed

[PATCH v3 0/8] Generalize start-powered-off property from ARM

2020-07-22 Thread Thiago Jung Bauermann
roperty_set_bool(). Suggested by Philippe. - Mention in the commit message Eduardo's observation that before this patch, the code didn't set cs->halted on reset. Thiago Jung Bauermann (8): target/arm: Move start-powered-off property to generic CPUState target/arm: Move setting of CPU hal

[PATCH v3 5/8] mips/cps: Use start-powered-off CPUState property

2020-07-22 Thread Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in main_cpu_reset(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/mips/cps.c | 6 +++--- 1 file changed, 3 insertions

[PATCH v3 1/8] target/arm: Move start-powered-off property to generic CPUState

2020-07-22 Thread Thiago Jung Bauermann
it wouldn't be a trivial change. This change should not cause any change in behavior. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- exec.c| 1 + include/hw/core/cpu.h | 4 target/arm/cpu.c | 5 ++--- target/arm

[PATCH v3 2/8] target/arm: Move setting of CPU halted state to generic code

2020-07-22 Thread Thiago Jung Bauermann
This change is in a separate patch because it's not so obvious that it won't cause a regression. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thiago Jung Bauermann --- hw/core/cpu.c| 2 +- target/arm/cpu.c | 1 - 2 files changed, 1 insertion(+), 2

Re: [RFC PATCH v2 9/9] target/s390x: Use start-powered-off CPUState property

2020-07-22 Thread Thiago Jung Bauermann
Eduardo Habkost writes: > On Wed, Jul 22, 2020 at 12:50:16AM -0300, Thiago Jung Bauermann wrote: >> Instead of setting CPUState::halted to 1 in s390_cpu_initfn(), use the >> start-powered-off property which makes cpu_common_reset() initialize it to >> 1 in common c

Re: [RFC PATCH v2 9/9] target/s390x: Use start-powered-off CPUState property

2020-07-22 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 7/22/20 5:50 AM, Thiago Jung Bauermann wrote: >> Instead of setting CPUState::halted to 1 in s390_cpu_initfn(), use the >> start-powered-off property which makes cpu_common_reset() initialize it to >> 1 in common code. >> &g

Re: [RFC PATCH v2 8/9] sparc/sun4m: Use one cpu_reset() function for main and secondary CPUs

2020-07-22 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 7/22/20 5:50 AM, Thiago Jung Bauermann wrote: >> If we rely on cpu_common_reset() setting CPUState::halted according to the >> start-powered-off property, both reset functions become equivalent and we >> can use only one. >> &g

Re: [RFC PATCH v2 7/9] sparc/sun4m: Don't set CPUState::halted in cpu_devinit()

2020-07-22 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 7/22/20 5:50 AM, Thiago Jung Bauermann wrote: >> Remove setting of cs->halted from cpu_devinit(), which seems out of place >> when compared to similar code in other architectures (e.g., ppce500_init() >> in hw/ppc/e500.c). >>

Re: [PATCH v2 5/9] mips/cps: Use start-powered-off CPUState property

2020-07-22 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 7/22/20 5:50 AM, Thiago Jung Bauermann wrote: >> Instead of setting CPUState::halted to 1 in main_cpu_reset(), use the >> start-powered-off property which makes cpu_common_reset() initialize it >> to 1 in common code. >> &g

Re: [PATCH v2 3/9] ppc/spapr: Use start-powered-off CPUState property

2020-07-22 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 7/22/20 5:50 AM, Thiago Jung Bauermann wrote: >> PowerPC sPAPR CPUs start in the halted state, and spapr_reset_vcpu() >> attempts to implement this by setting CPUState::halted to 1. But that's too >> late for the case of hotplug

Re: [PATCH v2 1/9] target/arm: Move start-powered-off property to generic CPUState

2020-07-22 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > Hi Thiago, > > On 7/22/20 5:50 AM, Thiago Jung Bauermann wrote: >> There are other platforms which also have CPUs that start powered off, so >> generalize the start-powered-off property so that it can be used by them. >> >&g

[RFC PATCH v2 9/9] target/s390x: Use start-powered-off CPUState property

2020-07-21 Thread Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in s390_cpu_initfn(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Signed-off-by: Thiago Jung Bauermann --- target/s390x/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) NB: I was only

[RFC PATCH v2 7/9] sparc/sun4m: Don't set CPUState::halted in cpu_devinit()

2020-07-21 Thread Thiago Jung Bauermann
Remove setting of cs->halted from cpu_devinit(), which seems out of place when compared to similar code in other architectures (e.g., ppce500_init() in hw/ppc/e500.c). Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 1 - 1 file changed, 1 deletion(-) NB: I was only able to t

[PATCH v2 4/9] ppc/e500: Use start-powered-off CPUState property

2020-07-21 Thread Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in ppce500_cpu_reset_sec(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Signed-off-by: Thiago Jung Bauermann --- hw/ppc/e500.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) NB

[RFC PATCH v2 8/9] sparc/sun4m: Use one cpu_reset() function for main and secondary CPUs

2020-07-21 Thread Thiago Jung Bauermann
If we rely on cpu_common_reset() setting CPUState::halted according to the start-powered-off property, both reset functions become equivalent and we can use only one. Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 21 - 1 file changed, 4 insertions(+), 17

[PATCH v2 5/9] mips/cps: Use start-powered-off CPUState property

2020-07-21 Thread Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in main_cpu_reset(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Signed-off-by: Thiago Jung Bauermann --- hw/mips/cps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) NB: I was only

[PATCH v2 6/9] sparc/sun4m: Use start-powered-off CPUState property

2020-07-21 Thread Thiago Jung Bauermann
Instead of setting CPUState::halted to 1 in secondary_cpu_reset(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Signed-off-by: Thiago Jung Bauermann --- hw/sparc/sun4m.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) NB: I

[PATCH v2 3/9] ppc/spapr: Use start-powered-off CPUState property

2020-07-21 Thread Thiago Jung Bauermann
causes it to see a stray vCPU that doesn't belong to any guest. Fix by setting the start-powered-off CPUState property in spapr_create_vcpu(), which makes cpu_common_reset() initialize CPUState::halted to 1 at an earlier moment. Suggested-by: Eduardo Habkost Signed-off-by: Thiago Jung Bauermann

[PATCH v2 1/9] target/arm: Move start-powered-off property to generic CPUState

2020-07-21 Thread Thiago Jung Bauermann
it wouldn't be a trivial change. This change should not cause any change in behavior. Suggested-by: Eduardo Habkost Signed-off-by: Thiago Jung Bauermann --- exec.c| 1 + include/hw/core/cpu.h | 4 target/arm/cpu.c | 5 ++--- target/arm/cpu.h | 3 --- target/arm/kvm32.c

[PATCH v2 2/9] target/arm: Move setting of CPU halted state to generic code

2020-07-21 Thread Thiago Jung Bauermann
This change is in a separate patch because it's not so obvious that it won't cause a regression. Suggested-by: Eduardo Habkost Signed-off-by: Thiago Jung Bauermann --- hw/core/cpu.c| 2 +- target/arm/cpu.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) NB: I was only able to test

[PATCH v2 0/9] Generalize start-powered-off property from ARM

2020-07-21 Thread Thiago Jung Bauermann
QOM lifecycle is basically non-existant so please be aware of that when reviewing this series. The last 3 patches I think are good cleanups but I'm even less confident in their correctness compared to the other patches, so I marked them as RFC. Applies cleanly on yesterday's master. Thiago J

Re: [PATCH] cpu: Add starts_halted() method

2020-07-10 Thread Thiago Jung Bauermann
Alex Bennée writes: > Thiago Jung Bauermann writes: > >> Eduardo Habkost writes: >> >>> On Wed, Jul 08, 2020 at 09:11:55PM +0100, Peter Maydell wrote: >>>> On Wed, 8 Jul 2020 at 18:36, Eduardo Habkost wrote: >>>> > >>>&g

Re: [PATCH] cpu: Add starts_halted() method

2020-07-10 Thread Thiago Jung Bauermann
Philippe Mathieu-Daudé writes: > On 7/9/20 5:26 AM, Thiago Jung Bauermann wrote: >> >> Thiago Jung Bauermann writes: >> >>> I'm seeing the vcpu being KVM_RUN'd too early twice during hotplug. >>> Both of them are before cpu_reset() and ppc_cpu_r

Re: [PATCH] cpu: Add starts_halted() method

2020-07-08 Thread Thiago Jung Bauermann
Thiago Jung Bauermann writes: > I'm seeing the vcpu being KVM_RUN'd too early twice during hotplug. > Both of them are before cpu_reset() and ppc_cpu_reset(). Hm, rereading the message obviously the above is partially wrong. The second case happens during ppc_cpu_reset(). > Here's t

Re: [PATCH] cpu: Add starts_halted() method

2020-07-08 Thread Thiago Jung Bauermann
Is there something wrong with that? I don't know anything about the QEMU device model to be able to tell. One other way I found to avoid the spurious KVM_RUN calls is to remove the cpu_resume() call in cpu_common_realizefn(), which to me seems to be placed way too early in the CPU hotplug path. Simply removing it makes CPU hotplug stop working though. :-) I still have to see if I can find a better place for it... -- Thiago Jung Bauermann IBM Linux Technology Center

Re: [PATCH] cpu: Add starts_halted() method

2020-07-07 Thread Thiago Jung Bauermann
Hello Eduardo, Eduardo Habkost writes: > On Tue, Jul 07, 2020 at 05:43:33PM -0300, Thiago Jung Bauermann wrote: >> PowerPC sPAPRs CPUs start in the halted state, but generic QEMU code >> assumes that CPUs start in the non-halted state. spapr_reset_vcpu() >> attempts to re

[PATCH] cpu: Add starts_halted() method

2020-07-07 Thread Thiago Jung Bauermann
call to map vCPUs to guests, and this issue causes it to see a stray vCPU that doesn't belong to any guest. Fix by adding a starts_halted() method to the CPUState class, and making it return 1 if the machine is an sPAPR guest. Signed-off-by: Thiago Jung Bauermann --- hw/core/cpu.c

Re: [RFC v2 00/18] Refactor configuration of guest memory protection

2020-06-08 Thread Thiago Jung Bauermann
David Gibson writes: > On Fri, Jun 05, 2020 at 05:01:07PM -0300, Thiago Jung Bauermann wrote: >> >> Paolo Bonzini writes: >> >> > On 05/06/20 01:30, Thiago Jung Bauermann wrote: >> >> Paolo Bonzini writes: >> >>> On 04/06/20 23:5

Re: [RFC v2 00/18] Refactor configuration of guest memory protection

2020-06-05 Thread Thiago Jung Bauermann
Paolo Bonzini writes: > On 05/06/20 01:30, Thiago Jung Bauermann wrote: >> Paolo Bonzini writes: >>> On 04/06/20 23:54, Thiago Jung Bauermann wrote: >>>> QEMU could always create a PEF object, and if the command line defines >>>> one, it will corresp

Re: [RFC v2 00/18] Refactor configuration of guest memory protection

2020-06-04 Thread Thiago Jung Bauermann
Paolo Bonzini writes: > On 04/06/20 23:54, Thiago Jung Bauermann wrote: >> QEMU could always create a PEF object, and if the command line defines >> one, it will correspond to it. And if the command line doesn't define one, >> then it would also work because the

Re: [RFC v2 00/18] Refactor configuration of guest memory protection

2020-06-04 Thread Thiago Jung Bauermann
David Gibson writes: > On Thu, Jun 04, 2020 at 01:39:22AM -0300, Thiago Jung Bauermann wrote: >> >> Hello David, >> >> David Gibson writes: >> >> > A number of hardware platforms are implementing mechanisms whereby the >> > hypervi

Re: [RFC v2 00/18] Refactor configuration of guest memory protection

2020-06-04 Thread Thiago Jung Bauermann
emory-protection property is specified? Regardless, I was able to successfuly launch POWER PEF guests using these patches: Tested-by: Thiago Jung Bauermann > can be extended to cover the Intel and s390 mechanisms as well, > though. > > Note: I'm using the term "guest memory protecti

Re: [Qemu-devel] [PATCH] .dir-locals.el: Explicitly set indentation level

2017-09-08 Thread Thiago Jung Bauermann
Markus Armbruster <arm...@redhat.com> writes: > Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> writes: > >> At least in some configurations, setting c-file-style is not enough to >> conform to the QEMU coding style, so explicitly set c-basic-offset as well. &g

  1   2   >