[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH] target/arm: disable FEAT_SME if we turn off SVE
From: |
Alex Bennée |
Subject: |
Re: [RFC PATCH] target/arm: disable FEAT_SME if we turn off SVE |
Date: |
Tue, 07 Feb 2023 15:09:57 +0000 |
User-agent: |
mu4e 1.9.19; emacs 29.0.60 |
Fabiano Rosas <farosas@suse.de> writes:
> Alex Bennée <alex.bennee@linaro.org> writes:
>
>> Before this change booting a -cpu max,sve=off would trigger and
>> assert:
>>
>> qemu-system-aarch64: ../../target/arm/helper.c:6647: sve_vqm1_for_el_sm:
>> Assertion `sm' failed.
>>
>> when the guest attempts to write to SMCR which shouldn't even exist if
>> SVE has been turned off.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>> ---
>> target/arm/cpu64.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
>> index 0e021960fb..a38d43421a 100644
>> --- a/target/arm/cpu64.c
>> +++ b/target/arm/cpu64.c
>> @@ -409,6 +409,13 @@ static void cpu_arm_set_sve(Object *obj, bool value,
>> Error **errp)
>> t = cpu->isar.id_aa64pfr0;
>> t = FIELD_DP64(t, ID_AA64PFR0, SVE, value);
>> cpu->isar.id_aa64pfr0 = t;
>> +
>> + /* FEAT_SME requires SVE, so disable it if no SVE */
>> + if (!value) {
>> + t = cpu->isar.id_aa64pfr1;
>> + t = FIELD_DP64(t, ID_AA64PFR1, SME, 0);
>> + cpu->isar.id_aa64pfr1 = t;
>> + }
>
> What about -cpu max,sve=off,sme=on ?
Gah - I bet this is going to depend on ordering of parameters as well.
Markus,
Is there any way to represent optionA implies optionB in our argument parsing?
--
Alex Bennée
Virtualisation Tech Lead @ Linaro