Skip to contentSkip to conversation

x86/vpmu: Fix build following vmfork addition

PATCH In review Andrew Cooper 2 participants 2 messages Jul 26, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/vpmu: Fix build following vmfork addition

GCC complains:

arch/x86/cpu/vpmu.c:351:15: error: conflicting types for 'vpmu_save_force'; have 'void(void *)' with implied 'nocf_check' attribute
351 | void cf_check vpmu_save_force(void *arg)
| ^~~~~~~~~~~~~~~
In file included from ./arch/x86/include/asm/domain.h:10,

                   from ./include/xen/domain.h:8,
                   from ./include/xen/sched.h:11,
                   from ./include/xen/event.h:12,
                   from arch/x86/cpu/vpmu.c:23:
  ./arch/x86/include/asm/vpmu.h:117:6: note: previous declaration of 'vpmu_save_force' with type 'void(void *)'
    117 | void vpmu_save_force(void *arg);
        |      ^~~~~~~~~~~~~~~

Adjust the declaraion.

Fixes 755087eb9b10 ("xen/mem_sharing: support forks with active vPMU state")

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Tamas K Lengyel <[email protected]>

---
 xen/arch/x86/include/asm/vpmu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/include/asm/vpmu.h +1 -1
index 8a3ae115623e..05e1fbfccfcf 100644
@@ -114,7 +114,7 @@ void vpmu_do_interrupt(struct cpu_user_regs *regs);
 void vpmu_initialise(struct vcpu *v);
 void vpmu_destroy(struct vcpu *v);
 void vpmu_save(struct vcpu *v);
-void vpmu_save_force(void *arg);
+void cf_check vpmu_save_force(void *arg);
 int vpmu_load(struct vcpu *v, bool_t from_guest);
 void vpmu_dump(struct vcpu *v);
 
Signature · 1 line
2.11.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Andrew Cooper

GCC complains:

arch/x86/cpu/vpmu.c:351:15: error: conflicting types for 'vpmu_save_force'; have 'void(void *)' with implied 'nocf_check' attribute
351 | void cf_check vpmu_save_force(void *arg)
| ^~~~~~~~~~~~~~~
In file included from ./arch/x86/include/asm/domain.h:10,

                   from ./include/xen/domain.h:8,
                   from ./include/xen/sched.h:11,
                   from ./include/xen/event.h:12,
                   from arch/x86/cpu/vpmu.c:23:
  ./arch/x86/include/asm/vpmu.h:117:6: note: previous declaration of 'vpmu_save_force' with type 'void(void *)'
    117 | void vpmu_save_force(void *arg);
        |      ^~~~~~~~~~~~~~~
Quoted 4 lines

Adjust the declaraion.

Fixes 755087eb9b10 ("xen/mem_sharing: support forks with active vPMU state")

Maybe worth mentioning that is is a non-default gcc?

Jan