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

Re: [PATCH 5/5] x86/traps: Clean up diagnostics


  • To: Andrew Cooper <amc96@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 22 Nov 2021 17:34:27 +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=a9LF+fweeCQ3ndoYkCSk/u/MH/+mpJvAtWmcG73EPxc=; b=EODYhbVwYkWMhrVUEIsDpDEmFu5UfUlQva4uq4AFHnFpI8VVUMjPe1Hc4eknK/67ppr/ZcoanjMifWD7dT+vLbVtHmIvingW8G50Jps8D3+nbxBg/8H+ZZcKnFbuuePlXSG1YT21+XlsQ+6KHCrTvASoy+HOXWY0Yf1YJcQq6KquvrvTHJsydbt+GobBbDnrjhyTzDNOr/29NeCWO8+eTHis1NyLr2UM+DloaXCTOkRQVkIr4KHx3eFSqH7Ql9Bibl2/N9DAgXpD99jefManXIpCdi3dVRTb8++xaUjfniyCLYwvNxpAr3imHyGa/dZA7Vc1siKiAanC5YDLk77EMg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JvON89sOBHX/IYOTW/TQ8UbMBGs5yhlcNfClTfeMMwHvtjYGRyhxqRO7injpgbWQLK9gfiUI+fNDcuWjG4ggK9pkJ6t3IxebGmAun5VM8xkTDCSp9uQ9ToEKg6ylVgUqbN9bl9y1F4oT0nkSlqZbEJD9vegIgZQv5nS8KrHfCJoTn3zc9wmzB4apLZAtQQZLJVHuy7qyMY2x3OH88XUkpgqkHBZ+zBr3WjvHkuqfCLUKRclspkYTtq4ficm2CYqHT2IxQLDUNmgTToC4Dl/K2NQWkmQY1EpdcQpxrjS6ux1ontpzT3e5GomD1o1lReRrIXpN5F8fZQ5ophHbG+i+mQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 22 Nov 2021 16:34:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.11.2021 17:26, Andrew Cooper wrote:
> On 22/11/2021 09:08, Jan Beulich wrote:
>> On 19.11.2021 19:21, Andrew Cooper wrote:
>>> --- a/xen/arch/x86/traps.c
>>> +++ b/xen/arch/x86/traps.c
>>> @@ -759,21 +759,7 @@ static int nmi_show_execution_state(const struct 
>>> cpu_user_regs *regs, int cpu)
>>>      return 1;
>>>  }
>>>  
>>> -const char *trapstr(unsigned int trapnr)
>>> -{
>>> -    static const char * const strings[] = {
>>> -        "divide error", "debug", "nmi", "bkpt", "overflow", "bounds",
>>> -        "invalid opcode", "device not available", "double fault",
>>> -        "coprocessor segment", "invalid tss", "segment not found",
>>> -        "stack error", "general protection fault", "page fault",
>>> -        "spurious interrupt", "coprocessor error", "alignment check",
>>> -        "machine check", "simd error", "virtualisation exception"
>>> -    };
>>> -
>>> -    return trapnr < ARRAY_SIZE(strings) ? strings[trapnr] : "???";
>>> -}
>>> -
>>> -static const char *vec_name(unsigned int vec)
>>> +const char *vec_name(unsigned int vec)
>> Is this perhaps too ambiguous a name for a non-static function? 
>> exn_vec_name()
>> at least, maybe?
> 
> "exception" has the same problem that "trap" has.  It's actively
> incorrect naming.

Well, yes, "exception_or_interrupt_name" would be more correct but quite
a bit too long for my taste. In an earlier project I did work on we
used "interruption" to cover everything (including hardware interrupts),
but the abbreviation thereof wouldn't be distinguishable from
"interrupt"'s.

Bottom line - you have my R-b, and the name change was just an extra
consideration.

Jan




 


Rackspace

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