[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFCv2 01/20] kvm: kvm_get_writable_id_regs
From: |
Cornelia Huck |
Subject: |
Re: [PATCH RFCv2 01/20] kvm: kvm_get_writable_id_regs |
Date: |
Fri, 13 Dec 2024 16:43:35 +0100 |
User-agent: |
Notmuch/0.38.3 (https://notmuchmail.org) |
On Thu, Dec 12 2024, Eric Auger <eric.auger@redhat.com> wrote:
> Hi Richard,
>
> On 12/12/24 14:59, Richard Henderson wrote:
>> On 12/6/24 05:21, Cornelia Huck wrote:
>>> +#define NR_ID_REGS (3 * 8 * 8)
>>> +
>>> +typedef struct IdRegMap {
>>> + uint64_t regs[NR_ID_REGS];
>>> +} IdRegMap;
>>> +
>>
>> Where does the NR_ID_REGS come from? In particular the * 3?
>> IIRC, all of the id registers are in op0=3, op1=0, crn=0, crm={0-7},
>> op2={0-7}.
>
> According to the KVM API and code,
>
> "The Feature ID space is defined as the AArch64 System register space
> with +op0==3, op1=={0, 1, 3}, CRn==0, CRm=={0-7}, op2=={0-7}."
>
>
> hence that choice
>
> See:
> https://lore.kernel.org/all/20230919175017.538312-3-jingzhangos@google.com/
>
> Definitively we can add a comment
I've added
/*
* ID registers in op0==3, op1=={0,1,3}, crn=0, crm=={0-7}, op2=={0-7},
* as used by the KVM_ARM_GET_REG_WRITABLE_MASKS ioctl call.
*/
[PATCH RFCv2 03/20] arm/cpu: Store aa64isar0 into the idregs arrays, Cornelia Huck, 2024/12/06
[PATCH RFCv2 04/20] arm/cpu: Store aa64isar1/2 into the idregs array, Cornelia Huck, 2024/12/06
[PATCH RFCv2 07/20] arm/cpu: Store aa64drf0/1 into the idregs array, Cornelia Huck, 2024/12/06
[PATCH RFCv2 05/20] arm/cpu: Store aa64drf0/1 into the idregs array, Cornelia Huck, 2024/12/06
[PATCH RFCv2 06/20] arm/cpu: Store aa64mmfr0-3 into the idregs array, Cornelia Huck, 2024/12/06