[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v3 1/7] xen/arm: add generic SCI subsystem


  • To: Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 24 Mar 2025 14:43:04 +0100
  • Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Grygorii Strashko <grygorii_strashko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Grygorii Strashko <gragst.linux@xxxxxxxxx>
  • Delivery-date: Mon, 24 Mar 2025 13:43:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.03.2025 14:11, Oleksii Moisieiev wrote:
> Hi Jan,
> 
> On 24/03/2025 12:05, Jan Beulich wrote:
>> On 24.03.2025 10:00, Oleksii Moisieiev wrote:
>>> Hi Jan,
>>>
>>> Let me answer one of your comment. Please see below:
>>>
>>> On 11/03/2025 13:43, Jan Beulich wrote:
>>>> On 11.03.2025 12:16, Grygorii Strashko wrote:
>>>>> --- a/MAINTAINERS
>>>>> +++ b/MAINTAINERS
>>>>> @@ -526,6 +526,12 @@ S:   Supported
>>>>>    F:     xen/arch/arm/include/asm/tee/
>>> [snip]
>>>>> --- a/xen/include/public/arch-arm.h
>>>>> +++ b/xen/include/public/arch-arm.h
>>>>> @@ -327,6 +327,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
>>>>>    #define XEN_DOMCTL_CONFIG_TEE_OPTEE     1
>>>>>    #define XEN_DOMCTL_CONFIG_TEE_FFA       2
>>>>>    
>>>>> +#define XEN_DOMCTL_CONFIG_ARM_SCI_NONE      0
>>>>> +
>>>>>    struct xen_arch_domainconfig {
>>>>>        /* IN/OUT */
>>>>>        uint8_t gic_version;
>>>>> @@ -350,6 +352,8 @@ struct xen_arch_domainconfig {
>>>>>         *
>>>>>         */
>>>>>        uint32_t clock_frequency;
>>>>> +    /* IN */
>>>>> +    uint8_t arm_sci_type;
>>>>>    };
>>>> You're not re-using a pre-existing padding field, so I don't see how you
>>>> can get away without bumping XEN_DOMCTL_INTERFACE_VERSION.
>>> We are reusing an existing padding field in xen_domctl, which is defined
>>> as pad[128].
>>>
>>> The xen_arch_domainconfig structure is a part of the following domctl
>>> structures:
>>>
>>> - xen_domctl_createdomain
>>>
>>> - xen_domctl_getdomaininfo
>>>
>>> These structures are included in the union within xen_domctl, which
>>> defines pad[128] for padding.
>> Except that "an existing padding field" means a field which isn't just
>> there in space, but is also checked to be zero right now. That is, new
>> code setting the field to non-zero needs to properly get an error
>> indicator back from an older hypervisor.
> 
> I completely agree with you that XEN_DOMCTL_INTERFACE_VERSION should be 
> incremented
> 
> before the changes are merged. I just wanted to point out that we do not 
> exceed the size of the xen_domctl padding. If you are okay with the 
> fields we have added, then XEN_DOMCTL_INTERFACE_VERSION will be updated 
> in the next patch series.
> 
>> but is also checked to be zero right now.
> 
> Just out of curiosity, I have one more question: I couldn't find the 
> check you've mentioned. Could you point me to where Xen or
> the toolstack checks the domctl structure for 0? I would greatly 
> appreciate it if you could show me.

There's no such check here (as far as I'm aware), hence why the interface
version bump is necessary. There are _other_ padding fields which do have
appropriate checks, and hence could be assigned purpose without bumping
the interface version.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.