On 7/28/22 16:05, Julien Grall wrote:
Hi,

On 28/07/2022 10:26, Jan Beulich wrote:
On 28.07.2022 09:57, Xenia Ragiadakou wrote:
--- a/xen/arch/arm/include/asm/current.h
+++ b/xen/arch/arm/include/asm/current.h
@@ -44,8 +44,11 @@ static inline struct cpu_info *get_cpu_info(void)
  #define guest_cpu_user_regs() (&get_cpu_info()->guest_cpu_user_regs)
+extern void return_to_new_vcpu32(void);
+extern void return_to_new_vcpu64(void);

While ultimately it's the Arm maintainers to judge, may I suggest that
these be put in arm/domain.c to limit visibility?

In general, I am not in favor of declaring prototype outside of headers. That said, I would be okay with it for the two prototypes because:
   1) they are prototypes for assembly functions
  2) declaring in current.h sounds wrong. A better place would be domain.h but this would not reduce the visibility too much
   3) this is unlikely to be used by other part of Xen

What I will ask is irrelevant to the placement but relevant to the declaration itself. I should also have declared them noreturn, right?

--
Xenia

Reply via email to