|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 07/17] xen/riscv: introduce vCPU AIA initialization
On 8/13/26 11:24 AM, Baptiste Le Duc wrote: Introduce vcpu_aia_init() to initialize the AIA-related state needed for a vCPU to have a working guest interrupt file. A guest (VS) interrupt file must be mapped to one of a pCPU's hardware interrupt files (if they exist), so the pCPU a vCPU will actually run on needs to be known first. arch_vcpu_create() is therefore not a suitable place to call vcpu_aia_init(), since the pCPU assigned to a vCPU can still change before it is first scheduled. To avoid reassigning the VS interrupt file id and remapping it to a different pCPU's hardware interrupt file, vcpu_aia_init() will instead be called from a later point in the scheduling path (e.g. continue_to_new_vcpu()), to be introduced in a follow-up patch. Since it will end up being called from a non-__init context, it is not itself marked __init.Introduce imsic_update_state() to update a vCPU's guest IMSIC state (the guest interrupt file id and the pCPU whose hardware interrupt file it is mapped to) as a single consistent unit. This state can be read concurrently, e.g. by a future helper that checks whether a vCPU has a pending IMSIC interrupt, though no such consumer exists yet at this stage - so it is protected by a lock. Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> diff --git a/xen/arch/riscv/aia.c b/xen/arch/riscv/aia.c index 4f7f46f58f..ed19600d46 100644 --- a/xen/arch/riscv/aia.c +++ b/xen/arch/riscv/aia.c @@ -14,6 +14,7 @@ #include <asm/cpufeature.h> #include <asm/csr.h> #include <asm/current.h> +#include <asm/imsic.h>struct vgein_ctrl { Yes, agree with that vgein_release() is missed. I've mentioned that before in reply to Jan B. Thanks! ~ Oleksii
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |