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

Re: [PATCH 3/5] x86/crash: Drop manual hooking of exception_table[]



On 22/11/2021 08:57, Jan Beulich wrote:
> On 19.11.2021 19:21, Andrew Cooper wrote:
>> --- a/xen/arch/x86/crash.c
>> +++ b/xen/arch/x86/crash.c
>> @@ -36,10 +36,8 @@ static unsigned int crashing_cpu;
>>  static DEFINE_PER_CPU_READ_MOSTLY(bool, crash_save_done);
>>  
>>  /* This becomes the NMI handler for non-crashing CPUs, when Xen is 
>> crashing. */
>> -static void noreturn do_nmi_crash(const struct cpu_user_regs *regs)
>> +static int noreturn do_nmi_crash(const struct cpu_user_regs *regs, int cpu)
>>  {
>> -    unsigned int cpu = smp_processor_id();
>> -
>>      stac();
>>  
>>      /* nmi_shootdown_cpus() should ensure that this assertion is correct. */
> Looks like this is the first instance of a noreturn function returning 
> non-void.
> Are you sufficiently certain that (older) compilers won't complain about 
> missing
> return statements (with a value)?

Yes.  https://godbolt.org/z/8a1efoh39

~Andrew



 


Rackspace

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