diff mbox series

[v11,04/13] target/arm: Do not expose all -cpu max features to qtests

Message ID 20230426180013.14814-5-farosas@suse.de
State New
Headers show
Series target/arm: Allow CONFIG_TCG=n builds | expand

Commit Message

Fabiano Rosas April 26, 2023, 6 p.m. UTC
We're about to move the TCG-only -cpu max configuration code under
CONFIG_TCG. To be able to do that we need to make sure the qtests
still have some cpu configured even when no other accelerator is
available.

Delineate now what is used with TCG-only and what is also used with
qtests to make the subsequent patches cleaner.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
 target/arm/cpu64.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comments

Richard Henderson April 27, 2023, 9:37 a.m. UTC | #1
On 4/26/23 19:00, Fabiano Rosas wrote:
> We're about to move the TCG-only -cpu max configuration code under
> CONFIG_TCG. To be able to do that we need to make sure the qtests
> still have some cpu configured even when no other accelerator is
> available.
> 
> Delineate now what is used with TCG-only and what is also used with
> qtests to make the subsequent patches cleaner.
> 
> Signed-off-by: Fabiano Rosas<farosas@suse.de>
> ---
>   target/arm/cpu64.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Philippe Mathieu-Daudé April 28, 2023, 10:35 p.m. UTC | #2
On 26/4/23 20:00, Fabiano Rosas wrote:
> We're about to move the TCG-only -cpu max configuration code under
> CONFIG_TCG. To be able to do that we need to make sure the qtests
> still have some cpu configured even when no other accelerator is
> available.
> 
> Delineate now what is used with TCG-only and what is also used with
> qtests to make the subsequent patches cleaner.
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
>   target/arm/cpu64.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)

https://lore.kernel.org/qemu-devel/ae65d59f-5e16-24bb-aece-ccdd504fe75e@linaro.org/

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

https://lore.kernel.org/qemu-devel/4d744ee9-372b-c1f1-0d0f-be06b4b63c6f@linaro.org/

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Fabiano Rosas May 2, 2023, 12:23 p.m. UTC | #3
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On 26/4/23 20:00, Fabiano Rosas wrote:
>> We're about to move the TCG-only -cpu max configuration code under
>> CONFIG_TCG. To be able to do that we need to make sure the qtests
>> still have some cpu configured even when no other accelerator is
>> available.
>> 
>> Delineate now what is used with TCG-only and what is also used with
>> qtests to make the subsequent patches cleaner.
>> 
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> ---
>>   target/arm/cpu64.c | 12 +++++++++---
>>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> https://lore.kernel.org/qemu-devel/ae65d59f-5e16-24bb-aece-ccdd504fe75e@linaro.org/
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
> https://lore.kernel.org/qemu-devel/4d744ee9-372b-c1f1-0d0f-be06b4b63c6f@linaro.org/
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

Ah, thank you! The 'b4 trailers' must have failed and I didn't notice.
diff mbox series

Patch

diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index e9161522b8..6a6a2ece2b 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -25,6 +25,8 @@ 
 #include "qemu/module.h"
 #include "sysemu/kvm.h"
 #include "sysemu/hvf.h"
+#include "sysemu/qtest.h"
+#include "sysemu/tcg.h"
 #include "kvm_arm.h"
 #include "hvf_arm.h"
 #include "qapi/visitor.h"
@@ -1365,10 +1367,14 @@  static void aarch64_max_initfn(Object *obj)
         return;
     }
 
+    if (tcg_enabled() || qtest_enabled()) {
+        aarch64_a57_initfn(obj);
+    }
+
     /* '-cpu max' for TCG: we currently do this as "A57 with extra things" */
-
-    aarch64_a57_initfn(obj);
-    aarch64_max_tcg_initfn(obj);
+    if (tcg_enabled()) {
+        aarch64_max_tcg_initfn(obj);
+    }
 }
 
 static const ARMCPUInfo aarch64_cpus[] = {