Skip to contentSkip to conversation

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

PATCH In review Oleksii Kurochko 3 participants 3 messages Nov 12 RISC-V

lore
Share & tools
lore
#0 lore raw

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

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")
---
 xen/arch/riscv/include/asm/imsic.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/riscv/include/asm/imsic.h +2 -2
index 639ee327dc67..217fc3d49b25 100644
@@ -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);
Signature · 1 line
2.56.0
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Oleksii Kurochko

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")
Reviewed-by on v1 1/1
#2 lore raw
In reply to Oleksii Kurochko
Quoted 28 lines · Oleksii Kurochko

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")
---
  xen/arch/riscv/include/asm/imsic.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/riscv/include/asm/imsic.h +2 -2
index 639ee327dc67..217fc3d49b25 100644
@@ -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);