Philippe Mathieu-Daudé <phi...@linaro.org> writes:

> On 12/4/23 14:18, Fabiano Rosas wrote:
>> From: Claudio Fontana <cfont...@suse.de>
>> 
>> move the module containing cpu models definitions
>> for 32bit TCG-only CPUs to tcg/ and rename it for clarity.
>> 
>> Signed-off-by: Claudio Fontana <cfont...@suse.de>
>> Signed-off-by: Fabiano Rosas <faro...@suse.de>
>> Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
>> Acked-by: Thomas Huth <th...@redhat.com>
>> ---
>>   hw/arm/virt.c                         |  2 +-
>>   target/arm/meson.build                |  1 -
>>   target/arm/{cpu_tcg.c => tcg/cpu32.c} | 13 +++----------
>>   target/arm/tcg/cpu64.c                |  2 +-
>>   target/arm/tcg/meson.build            |  1 +
>>   tests/qtest/arm-cpu-features.c        | 12 +++++++++---
>>   6 files changed, 15 insertions(+), 16 deletions(-)
>>   rename target/arm/{cpu_tcg.c => tcg/cpu32.c} (99%)
>
>
>> diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c
>> index 1cb08138ad..1555b0bab8 100644
>> --- a/tests/qtest/arm-cpu-features.c
>> +++ b/tests/qtest/arm-cpu-features.c
>> @@ -506,9 +506,15 @@ static void test_query_cpu_model_expansion_kvm(const 
>> void *data)
>>           QDict *resp;
>>           char *error;
>>   
>> -        assert_error(qts, "cortex-a15",
>> -            "We cannot guarantee the CPU type 'cortex-a15' works "
>> -            "with KVM on this host", NULL);
>> +        if (qtest_has_accel("tcg")) {
>
> Can we add a comment to explain this non trivial case?
>

Hi, good idea, this is a bit opaque indeed.

> I suppose the reason is "KVM is builtin but not available, so we don't
> want to test the TCG fallback", is that correct?
>

No, it's just that originally the default cpu was cortex-a15 which we
don't give guarantees for when using KVM. But now that cpu is not
present in the KVM-only build at all, hence "The CPU ... is not a
recognized ARM CPU type".

>> +            assert_error(qts, "cortex-a15",
>> +                         "We cannot guarantee the CPU type 'cortex-a15' 
>> works "
>> +                         "with KVM on this host", NULL);
>> +        } else {
>> +            assert_error(qts, "cortex-a15",
>> +                         "The CPU type 'cortex-a15' is not a "
>> +                         "recognized ARM CPU type", NULL);
>> +        }
>>   
>>           assert_has_feature_enabled(qts, "host", "aarch64");
>>   

Reply via email to