[PATCH] xen/riscv: add cf_check to vcpu_imsic_{init,deinit}() declarations

Oleksii Kurochko posted 1 patch 1 week, 4 days ago
xen/arch/riscv/include/asm/imsic.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] xen/riscv: add cf_check to vcpu_imsic_{init,deinit}() declarations
Posted by Oleksii Kurochko 1 week, 4 days ago
vcpu_imsic_init() and vcpu_imsic_deinit() are indirect call targets, as
vAPLIC's vcpu_init and vcpu_deinit callbacks, and are defined cf_check
accordingly. Their declarations in asm/imsic.h lack the attribute,
though, while cf_check is to be present on the declarations as well.

Add cf_check to the declarations, so that they match the definitions.

Fixes: 9164a97efbeb ("xen/riscv: introduce minimal virtual APLIC (vAPLIC) infrastructure")
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/include/asm/imsic.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/riscv/include/asm/imsic.h b/xen/arch/riscv/include/asm/imsic.h
index 639ee327dc67..217fc3d49b25 100644
--- a/xen/arch/riscv/include/asm/imsic.h
+++ b/xen/arch/riscv/include/asm/imsic.h
@@ -90,8 +90,8 @@ void imsic_irq_disable(unsigned int hwirq);
 
 void imsic_ids_local_delivery(bool enable);
 
-int vcpu_imsic_init(struct vcpu *v);
-void vcpu_imsic_deinit(struct vcpu *v);
+int cf_check vcpu_imsic_init(struct vcpu *v);
+void cf_check vcpu_imsic_deinit(struct vcpu *v);
 unsigned int vcpu_guest_file_id(const struct vcpu *v);
 
 int vimsic_make_domu_dt_node(struct kernel_info *kinfo, unsigned int *phandle);
-- 
2.56.0
Re: [PATCH] xen/riscv: add cf_check to vcpu_imsic_{init,deinit}() declarations
Posted by Baptiste Le Duc 1 week, 4 days ago
Reviewed-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>

On 11/12/26 12:48 PM, Oleksii Kurochko wrote:
> vcpu_imsic_init() and vcpu_imsic_deinit() are indirect call targets, as
> vAPLIC's vcpu_init and vcpu_deinit callbacks, and are defined cf_check
> accordingly. Their declarations in asm/imsic.h lack the attribute,
> though, while cf_check is to be present on the declarations as well.
> 
> Add cf_check to the declarations, so that they match the definitions.
> 
> Fixes: 9164a97efbeb ("xen/riscv: introduce minimal virtual APLIC (vAPLIC) infrastructure")
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> ---
>   xen/arch/riscv/include/asm/imsic.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/riscv/include/asm/imsic.h b/xen/arch/riscv/include/asm/imsic.h
> index 639ee327dc67..217fc3d49b25 100644
> --- a/xen/arch/riscv/include/asm/imsic.h
> +++ b/xen/arch/riscv/include/asm/imsic.h
> @@ -90,8 +90,8 @@ void imsic_irq_disable(unsigned int hwirq);
>   
>   void imsic_ids_local_delivery(bool enable);
>   
> -int vcpu_imsic_init(struct vcpu *v);
> -void vcpu_imsic_deinit(struct vcpu *v);
> +int cf_check vcpu_imsic_init(struct vcpu *v);
> +void cf_check vcpu_imsic_deinit(struct vcpu *v);
>   unsigned int vcpu_guest_file_id(const struct vcpu *v);
>   
>   int vimsic_make_domu_dt_node(struct kernel_info *kinfo, unsigned int *phandle);
Re: [PATCH] xen/riscv: add cf_check to vcpu_imsic_{init,deinit}() declarations
Posted by Jan Beulich 1 week, 4 days ago
On 12.11.2026 12:46, Oleksii Kurochko wrote:
> vcpu_imsic_init() and vcpu_imsic_deinit() are indirect call targets, as
> vAPLIC's vcpu_init and vcpu_deinit callbacks, and are defined cf_check
> accordingly. Their declarations in asm/imsic.h lack the attribute,
> though, while cf_check is to be present on the declarations as well.
> 
> Add cf_check to the declarations, so that they match the definitions.
> 
> Fixes: 9164a97efbeb ("xen/riscv: introduce minimal virtual APLIC (vAPLIC) infrastructure")
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

Acked-by: Jan Beulich <jbeulich@suse.com>