From: Cornelia Huck <cohuck@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: eric.auger.pro@gmail.com, eric.auger@redhat.com,
qemu-devel@nongnu.org, qemu-arm@nongnu.org,
kvmarm@lists.linux.dev, richard.henderson@linaro.org,
alex.bennee@linaro.org, maz@kernel.org, oliver.upton@linux.dev,
sebott@redhat.com, shameerali.kolothum.thodi@huawei.com,
armbru@redhat.com, berrange@redhat.com, abologna@redhat.com,
jdenemar@redhat.com, agraf@csgraf.de, shahuang@redhat.com,
mark.rutland@arm.com, philmd@linaro.org, pbonzini@redhat.com
Subject: Re: [PATCH v8 13/14] arm/cpu: switch to a generated cpu-sysregs.h.inc
Date: Tue, 01 Jul 2025 18:06:49 +0200 [thread overview]
Message-ID: <87bjq3rj3a.fsf@redhat.com> (raw)
In-Reply-To: <CAFEAcA9OXi4v+hdBMamQv85HYp2EqxOA5=nfsdZ5E3nf8RP_pw@mail.gmail.com>
On Mon, Jun 30 2025, Peter Maydell <peter.maydell@linaro.org> wrote:
> On Tue, 17 Jun 2025 at 16:41, Cornelia Huck <cohuck@redhat.com> wrote:
>>
>> Generated against Linux 6.15.
>>
>> Reviewed-by: Sebastian Ott <sebott@redhat.com>
>> Reviewed-by: Eric Auger <eric.auger@redhat.com>
>> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
>
> Stripping out all the lines that just moved around,
> here are the additions:
>
>> +DEF(ID_AFR0_EL1, 3, 0, 0, 1, 3)
>
> This is ARMCPU::id_afr0. If we want to store this in
> the idregs[] array that's fine but we ought to move it.
>
I guess the *afr* regs fell into the cracks because they were not in the
isar struct -- makes sense to move them.
(This reg "must be interpreted with" MIDR_EL1; I'm wondering if that has
any implications once we enlighten guests with possible midr/revidr/aidr
values.)
>> +DEF(ID_AA64PFR2_EL1, 3, 0, 0, 4, 2)
>
>> +DEF(ID_AA64FPFR0_EL1, 3, 0, 0, 4, 7)
>
>> +DEF(ID_AA64DFR2_EL1, 3, 0, 0, 5, 2)
>
> These are all ID registers we don't implement yet
> because we don't implement any features that are
> described in them (i.e. our implementation is RAZ/WI).
> I guess it's OK to list them here, though we won't
> do anything with the array entry.
I don't think it hurts to include them, it makes things easier when we
want to deal with non-zero values in there via kvm.
>
>> +DEF(ID_AA64AFR0_EL1, 3, 0, 0, 5, 4)
>
> ARMCPU::id_aa64afr0
>
>> +DEF(ID_AA64AFR1_EL1, 3, 0, 0, 5, 5)
>
> ARMCPU::id_aa64afr1
>
>> +DEF(ID_AA64ISAR3_EL1, 3, 0, 0, 6, 3)
>
>> +DEF(ID_AA64MMFR4_EL1, 3, 0, 0, 7, 4)
>
> More ID regs for features we don't implement yet.
>
>> +DEF(CCSIDR_EL1, 3, 1, 0, 0, 0)
>
> CCSIDR_EL1 isn't a single ID register, it's an array
> of them (indexed by CCSELR_EL1). We keep them in
> ARMCPU::ccsidr[]. I don't think it makes sense to
> have an entry in isar.idregs[] for this.
Hm, IIUC, kvm gets the correct CCSIDR_EL1 under the covers already
(i.e. no array).
>
>> +DEF(CLIDR_EL1, 3, 1, 0, 0, 1)
>
> ARMCPU::clidr
>
>> +DEF(CCSIDR2_EL1, 3, 1, 0, 0, 2)
>
> This is an array too.
Currently, kvm handles this as undef.
(I think the whole cache stuff might be a bit of a headache.)
>
>> +DEF(GMID_EL1, 3, 1, 0, 0, 4)
>
> Another ID register for a feature we don't yet implement
> (and a slightly oddball one in that it should UNDEF
> until we do implement FEAT_MTE2).
>
>> +DEF(SMIDR_EL1, 3, 1, 0, 0, 6)
>
> We implement this as a fixed zero in helper.c.
Undef in kvm.
>
>> +DEF(DCZID_EL0, 3, 3, 0, 0, 7)
>
> We construct the value of this one in aa64_dczid_read()
> based on ARMCPU::dcz_blocksize plus some runtime info.
That one's another bit of a headache (I didn't manage to spot kvm code
dealing with it.)
I'll move the *afr* ones, not yet quite sure how to deal with the cache
related ones.
next prev parent reply other threads:[~2025-07-01 16:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 15:39 [PATCH v8 00/14] arm: rework id register storage Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 01/14] arm/cpu: Add sysreg definitions in cpu-sysregs.h Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 02/14] arm/cpu: Store aa64isar0/aa64zfr0 into the idregs arrays Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 03/14] arm/cpu: Store aa64isar1/2 into the idregs array Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 04/14] arm/cpu: Store aa64pfr0/1 " Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 05/14] arm/cpu: Store aa64mmfr0-3 " Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 06/14] arm/cpu: Store aa64dfr0/1 " Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 07/14] arm/cpu: Store aa64smfr0 " Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 08/14] arm/cpu: Store id_isar0-7 " Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 09/14] arm/cpu: Store id_pfr0/1/2 " Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 10/14] arm/cpu: Store id_dfr0/1 " Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 11/14] arm/cpu: Store id_mmfr0-5 " Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 12/14] arm/cpu: Add sysreg generation scripts Cornelia Huck
2025-06-17 15:45 ` Cornelia Huck
2025-06-25 9:16 ` Eric Auger
2025-06-25 9:23 ` Daniel P. Berrangé
2025-06-25 9:31 ` Eric Auger
2025-06-25 9:24 ` Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 13/14] arm/cpu: switch to a generated cpu-sysregs.h.inc Cornelia Huck
2025-06-30 15:23 ` Peter Maydell
2025-07-01 16:06 ` Cornelia Huck [this message]
2025-07-01 16:49 ` Peter Maydell
2025-07-02 9:01 ` Cornelia Huck
2025-06-17 15:39 ` [PATCH v8 14/14] arm/kvm: use fd instead of fdarray[2] Cornelia Huck
2025-06-25 9:10 ` [PATCH v8 00/14] arm: rework id register storage Eric Auger
2025-06-25 10:14 ` Peter Maydell
2025-06-25 16:37 ` Cornelia Huck
2025-06-30 10:04 ` Cornelia Huck
2025-06-30 15:25 ` Peter Maydell
2025-06-30 16:02 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bjq3rj3a.fsf@redhat.com \
--to=cohuck@redhat.com \
--cc=abologna@redhat.com \
--cc=agraf@csgraf.de \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=eric.auger@redhat.com \
--cc=jdenemar@redhat.com \
--cc=kvmarm@lists.linux.dev \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=sebott@redhat.com \
--cc=shahuang@redhat.com \
--cc=shameerali.kolothum.thodi@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.