x86: identify reset_stack_and_jump() as noreturn

reset_stack_and_jump() is actually a macro, but can effectivly become noreturn
by giving it an unreachable() declaration.

Propagate the 'noreturn-ness' up through the direct and indirect callers.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
Acked-by: Keir Fraser <keir@xen.org>
This commit is contained in:
Andrew Cooper authored and Jan Beulich committed 2014-03-04 11:19:20 +01:00
1 parent f600b324bc
commit ceff76a5be
6 files changed
+13 -12

No files matched your search

+2 -4
View File
@@ -133,12 +133,12 @@ void startup_cpu_idle_loop(void)
reset_stack_and_jump(idle_loop);
}
static void continue_idle_domain(struct vcpu *v)
static void noreturn continue_idle_domain(struct vcpu *v)
{
reset_stack_and_jump(idle_loop);
}
static void continue_nonidle_domain(struct vcpu *v)
static void noreturn continue_nonidle_domain(struct vcpu *v)
{
check_wakeup_from_wait();
mark_regs_dirty(guest_cpu_user_regs());
@@ -1521,13 +1521,11 @@ void context_switch(struct vcpu *prev, struct vcpu *next)
update_vcpu_system_time(next);
schedule_tail(next);
BUG();
}
void continue_running(struct vcpu *same)
{
schedule_tail(same);
BUG();
}
int __sync_local_execstate(void)
+1 -1
View File
@@ -911,7 +911,7 @@ static void svm_ctxt_switch_to(struct vcpu *v)
wrmsrl(MSR_TSC_AUX, hvm_msr_tsc_aux(v));
}
static void svm_do_resume(struct vcpu *v)
static void noreturn svm_do_resume(struct vcpu *v)
{
struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
bool_t debug_state = v->domain->debugger_attached;
+1 -1
View File
@@ -537,7 +537,7 @@ static char * __init cmdline_cook(char *p, char *loader_name)
return p;
}
void __init __start_xen(unsigned long mbi_p)
void __init noreturn __start_xen(unsigned long mbi_p)
{
char *memmap_type = NULL;
char *cmdline, *kextra, *loader;
+7 -4
View File
@@ -59,10 +59,13 @@ static inline struct cpu_info *get_cpu_info(void)
((sp & (~(STACK_SIZE-1))) + \
(STACK_SIZE - sizeof(struct cpu_info) - sizeof(unsigned long)))
#define reset_stack_and_jump(__fn) \
__asm__ __volatile__ ( \
"mov %0,%%"__OP"sp; jmp %c1" \
: : "r" (guest_cpu_user_regs()), "i" (__fn) : "memory" )
#define reset_stack_and_jump(__fn) \
({ \
__asm__ __volatile__ ( \
"mov %0,%%"__OP"sp; jmp %c1" \
: : "r" (guest_cpu_user_regs()), "i" (__fn) : "memory" ); \
unreachable(); \
})
#define schedule_tail(vcpu) (((vcpu)->arch.schedule_tail)(vcpu))
+1 -1
View File
@@ -395,7 +395,7 @@ struct arch_vcpu
unsigned long flags; /* TF_ */
void (*schedule_tail) (struct vcpu *);
void noreturn (*schedule_tail) (struct vcpu *);
void (*ctxt_switch_from) (struct vcpu *);
void (*ctxt_switch_to) (struct vcpu *);
+1 -1
View File
@@ -91,7 +91,7 @@ typedef enum {
void vmx_asm_vmexit_handler(struct cpu_user_regs);
void vmx_asm_do_vmentry(void);
void vmx_intr_assist(void);
void vmx_do_resume(struct vcpu *);
void noreturn vmx_do_resume(struct vcpu *);
void vmx_vlapic_msr_changed(struct vcpu *v);
void vmx_realmode(struct cpu_user_regs *regs);
void vmx_update_debug_state(struct vcpu *v);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.