[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] move {,vcpu_}show_execution_state() declarations to common header


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 16 Mar 2023 12:55:12 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dGnmrU/GN0A5AfAnkaSaGxPWEurVOv/cP25RS/1DKKQ=; b=jHNAAXjWSc/A8VHLouBiGhLfQT0bZA7z45TjFSzH7StkfzZi+90N9dtogj70iqjr6unF06TJxEnFRglXoeYMvAu25oOfHFqVqv70pnFqqLMO/LseOuoSci3eyYJp9ovlqPZ2wVnQF1+CpzsMb4v5GKHYB2CTP+N1gL/CyFKqdhgruPXFKdmoeRNwLRaaHNmggM8mG4S2GMK9a8W99iPywnwx6GvKr+3Rg8+/ZCLGuX7yHxDxqSstMRt5/v7/Ff38OTBqPO5VqyHa4fNuLfDQo0skrN+jQMRk4MRf5rFUYFcKYX+VUxw+cotvh1rMzUsDo8wGTvnMCKt8jzrT36AYVg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DUPusq/+BfYujWs1RANMiLqZ2sW6xDi7EQSXI8yISKNnXFHy7PL6vJaAUwDU0+ClnUdKFIxNOHntSvL3rtoC+colamVAkxNnIWq9dJnXalZm2P+awEgq1rOfWA/Vq+YF0H3dTqIWwLvpJUpxjiSERDinM4OPYebNtz2BP3AMmdBpdtiOcrn0Z8cirGLvs2nG2GYAyaNzNZEkcuanMx0QJygy+8BLSlQcF4MOCxHY3JEK0n+E5vRsB+lGLyGYy/7lrmTHRlSI/ahJETcG5UtLrNah9pxccWU8SCmYhdTil9lU/tHceFMdexHX42/+WfEBkrwXiQPNVNLDETxTtXE9yA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Thu, 16 Mar 2023 11:55:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

These are used from common code, so their signatures should be
consistent across architectures. This is achieved / guaranteed easiest
when their declarations are in a common header.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
There's no really good header to put the decls, imo; I wanted to avoid
the already overcrowded sched.h. show_execution_state_nonconst(), being
there solely for dump_execution_state(), could of course live in the
upcoming xen/bug.h ...

Is there a reason that Arm (still) expands dump_execution_state() to
WARN()? Without that moving x86's show_execution_state_nonconst()
definition to common code would also make sense (it could be done
anyway, but then at the expense of introducing dead code to Arm),
perhaps (see also above) into the upcoming common/bug.c.

--- a/xen/arch/arm/include/asm/domain.h
+++ b/xen/arch/arm/include/asm/domain.h
@@ -232,7 +232,6 @@ struct arch_vcpu
 
 }  __cacheline_aligned;
 
-void vcpu_show_execution_state(struct vcpu *);
 void vcpu_show_registers(const struct vcpu *);
 void vcpu_switch_to_aarch64_mode(struct vcpu *);
 
--- a/xen/arch/arm/include/asm/processor.h
+++ b/xen/arch/arm/include/asm/processor.h
@@ -557,7 +557,6 @@ extern register_t __cpu_logical_map[];
 #ifndef __ASSEMBLY__
 void panic_PAR(uint64_t par);
 
-void show_execution_state(const struct cpu_user_regs *regs);
 /* Debugging functions are declared with external linkage to aid development. 
*/
 void show_registers(const struct cpu_user_regs *regs);
 void show_stack(const struct cpu_user_regs *regs);
--- a/xen/arch/x86/include/asm/domain.h
+++ b/xen/arch/x86/include/asm/domain.h
@@ -681,7 +681,6 @@ void domain_cpu_policy_changed(struct do
 bool update_secondary_system_time(struct vcpu *,
                                   struct vcpu_time_info *);
 
-void vcpu_show_execution_state(struct vcpu *);
 void vcpu_show_registers(const struct vcpu *);
 
 static inline struct vcpu_guest_context *alloc_vcpu_guest_context(void)
--- a/xen/arch/x86/include/asm/processor.h
+++ b/xen/arch/x86/include/asm/processor.h
@@ -464,8 +464,6 @@ static always_inline void rep_nop(void)
 void show_code(const struct cpu_user_regs *regs);
 void show_stack_overflow(unsigned int cpu, const struct cpu_user_regs *regs);
 void show_registers(const struct cpu_user_regs *regs);
-void show_execution_state(const struct cpu_user_regs *regs);
-void cf_check show_execution_state_nonconst(struct cpu_user_regs *regs);
 #define dump_execution_state() \
     run_in_exception_handler(show_execution_state_nonconst)
 void show_page_walk(unsigned long addr);
--- a/xen/include/xen/kernel.h
+++ b/xen/include/xen/kernel.h
@@ -107,5 +107,12 @@ bool_t is_active_kernel_text(unsigned lo
 extern const char xen_config_data[];
 extern const unsigned int xen_config_data_size;
 
+struct cpu_user_regs;
+struct vcpu;
+
+void show_execution_state(const struct cpu_user_regs *regs);
+void cf_check show_execution_state_nonconst(struct cpu_user_regs *regs);
+void vcpu_show_execution_state(struct vcpu *);
+
 #endif /* _LINUX_KERNEL_H */
 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.