|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 12/27] xen/riscv: introduce aia_init() and aia_available()
On 4/16/26 2:06 PM, Jan Beulich wrote: On 13.04.2026 11:32, Oleksii Kurochko wrote:On 4/2/26 11:00 AM, Jan Beulich wrote:On 10.03.2026 18:08, Oleksii Kurochko wrote:aia_init() is going to contain all the stuff related to AIA initialization. At the moment, it is just Check if SSAIA extension is available and if yes set is_aia_available to true.And (future) users of aia_available() can't directly call riscv_isa_extension_available()? Nor can aia_available() be a convenience wrapper around that call? It's only ...--- /dev/null +++ b/xen/arch/riscv/aia.c @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <xen/errno.h> +#include <xen/init.h> +#include <xen/sections.h> +#include <xen/types.h> + +#include <asm/cpufeature.h> + +static bool __ro_after_init is_aia_available;... a boolean, yes, but still.My purpose was to have a variable which represent that AIA is initialized properly. Maybe, it makes sense to rename this variable to is_aia_inited.I'm generally having trouble with the non-word "inited". How about "aia_usable"? Fits ...The idea is that in future patches VGEIN will be also initialized in aia_init() and if wasn't initialized properly then just keep is_aia_availabe be set to false and in such case we will have that is_aia_available != riscv_isa_extension_available(NULL, RISCV_ISA_EXT_ssaia).... this as well. And ...Note that regarding VGEIN it is arguable that it should be initialized as generally it could be that there is no VGEIN what means that h/w assisted guest interrupt files aren't available and s/w one should be used. But s/w guest interrupt files aren't supported. So I mean that with the current implementation if VGEIN isn't initialized I will tell that AIA isn't available what generally isn't quite true.... this. Question of course if what aia_usable (or whatever its name) being set to false means to Xen's own operation. If Xen would still work okay (without being able to create guests), perhaps the name may want to be "aia_guest_usable" or some such. I.e. as I said on a number of occasions: A variable wants to be named to accurately express its purpose, without the name growing excessively long. aia_usable sounds good to me.It covers also the case if AIA isn't expected to be used as h/w uses non-AIA-compliant interrupt controller, for example, PLIC. ~ Oleksii
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |