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

Re: [PATCH v1 10/27] xen/riscv: generate IMSIC DT node for guest domains


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 17 Apr 2026 15:50:42 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=suse.com header.i="@suse.com" header.h="Content-Transfer-Encoding:In-Reply-To:Autocrypt:From:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID"
  • 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: Romain Caritey <Romain.Caritey@xxxxxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 17 Apr 2026 13:50:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.04.2026 10:10, Oleksii Kurochko wrote:
> On 4/16/26 1:42 PM, Jan Beulich wrote:
>> On 10.04.2026 17:40, Oleksii Kurochko wrote:
>>> On 4/1/26 5:05 PM, Jan Beulich wrote:
>>>> On 10.03.2026 18:08, Oleksii Kurochko wrote:
>>>>> Guests using the IMSIC interrupt controller require a corresponding
>>>>> Device Tree description. Add support for generating an IMSIC node when
>>>>> building the guest DT.
>>>>>
>>>>> Keep a reference to the host IMSIC DT node and reuse its compatible
>>>>> property while constructing the guest-visible node.
>>>>
>>>> Again raises a migration concern. Presumably a guest would then be able
>>>> to migrate only to other hosts with the same compatible property.
>>>
>>> Right, but I don't think we can do too much and it is the simplest
>>> approach just to migrate to hosts with the same compatible property.
>>>
>>> If you concern is about DTS property then for IMSIC it will be always
>>> riscv,imsics according to the RISC-V DT spec. (IIRC, the only other
>>> option could be qemu,riscv). Actually, I can just hard code
>>> "riscv,imsic" explicitly instead of re-using of host name.
>>>
>>> If your concern is that we will migrate to a host which doesn't support
>>> IMSIC at all then we should or (a) don't migrate to such host or (b)
>>> provide an emulation of IMSIC. And option (b) would be terrible from at
>>> least performance point of view.
>>
>> That would all be only a secondary concern - in an IMSIC is needed right
>> now, so be it. My primary concern is with inheriting the host IMSIC's
>> properties.
> Could we do really something better?
> 
> At the moment, the following properties are inhereted:
> node name -> not an issue at all, it is just a name of the node and 
> generally doesn't matter what it is in the matter of DTB generation as 
> phandle number of this node will be used as pointer to this node, not 
> the name. If it would be better I can hard code just "imsic".
> 
> compatible -> also, not a big issue. According to current DT RISC-V 
> bindings it could be just "riscv,imsic". But then I have the question 
> what if one day someone will come up with own implementation of IMSIC 
> then "riscv,own-imsic" will be in host DTB and so I expect that guest 
> DTB should have it as this h/w expects to use specifically OWN-IMSIC 
> driver. So it seems okay to copy compatible from host DTB. Yes, if 
> migration will happen where just "riscv,imsic" is supported then it 
> can't be easily migrated to such h/w and its okay. But generally I 
> expect that compatible will always riscv,imsic.
> 
> riscv,num-ids -> generally, it could be any number from [63, 2047], but 
> it seems like there is no any sense if put a value bigger then 
> guest-num-ids=min(riscv,num-ids, riscv,num-guest-ids) for guest as h/w 
> can't support more then that. At the same time I don't see too much 
> sense to tell a guest that it supports less then guest-num-ids. What is 
> the problem to give a guest a maximum that IMSIC could provide? With 
> migration, of course, it will be an issue if new host will support 
> different number of riscv,num-ids but I don't know what we can do better 
> then just avoid migration to such hosts if old-num-ids > new-num-ids 
> without significant performance drop.

This is exactly why an admin may want to limit what a guest gets to
see / use.

Jan



 


Rackspace

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