[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/4] build: use common stubs for debugger_trap_* functions if !CONFIG_CRASH_DEBUG
- To: Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Bobby Eshleman <bobby.eshleman@xxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 15 Jul 2021 08:45:41 +0200
- 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-SenderADCheck; bh=1grGS3Ch3I7ps8Ccjbeaeob8QxHDWCTe9PRQyg1p5zA=; b=IcBWAeMrVJugCYQr9h6Te00x1mtWEQTOG0pg0L2T7EfutVdwH0LbsHmqLiUDsPBLHXlHQFpa2rcxgXGCZwqX+qCXeKKiOpo69mlZaXPau6UsK3N5p/7qhoa3YG4fE8hDh4EzLZyZRaNzcKcw8s/n6pkeTQcDdtmPYPwWP+0YYe/gfpwLDows5RSz4x8BUDwAduE4tsKpSd6x62A6n/Tq5ThB8ISYG84xICQ4SYQk7v5hfkRyw1VZMmTaJ3CdjGiTHI4kFWwnhsHwyb6pScTuGZ3M4Qib2wM/uiPwveGUQ0Yd6UwK+ekGMc8xluMuRg6bw6ukM6R3mAAjejuAQAQCNA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BT1juY44ShMQeuLvdt+cVmEZkg1vjZRGV2NeNGJJ5cpqdHtpeFqITrhMu/v5mgG+tPGOczPncfqlNTKLGejwQgk1mDGl1dm1fecxJCz+fz/aqvxwYqPNkU3LvQP8Jq9s0PPB7gUnw1atgM/xKO7fgsZYYufh9xEAYfOO/0k0mX8jkFC7BfTQnOoZYgPenmzMHjYV6DgiGOxP+CS1yAA+d3cTyPQ5j8UQXvOY91wX60QHzKkSB4ToHftagiw3mNjxnZaiZPWCF7WiKM0UsawO3yCK/0zjGqOKIvVCCHUk17hMCI/MWYC8Mw6G9BKotCsHsNdN0KS36OVSjtXudRM0XQ==
- Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 15 Jul 2021 06:45:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 14.07.2021 23:03, Bob Eshleman wrote:
> On 7/14/21 2:34 AM, Jan Beulich wrote:
>>> +static inline bool debugger_trap_fatal(
>>> + unsigned int vector, const struct cpu_user_regs *regs)
>>
>> I'm afraid the concept of a vector may not be arch-independent.
>>
>
> The only way I can imagine it not being arch-independent
> is if it is thought of as a trap number or id, instead of
> implying an entry in a vectored trap table. I don't
> really understand this subsystem, so I'm probably missing
> context.
>
> Are you suggesting a rename or a different approach entirely?
I'm suggesting that we shouldn't be claiming something to be an
abstraction when it isn't really. There's exactly one use of
debugger_trap_fatal() outside x86/ after patch 1 of this series:
static void do_debugger_trap_fatal(struct cpu_user_regs *regs)
{
(void)debugger_trap_fatal(0xf001, regs);
...
}
That's very certainly _not_ arch-independent. Hence I'd rather
see some #ifdef-ary added there and the function remaining
x86-specific for the time being, i.e. until such a time when
someone might come forward with a suitable abstraction. Perhaps
(as an alternative to #ifdef-ary) the '%' debug key should be
x86-specific altogether, and perhaps its setup and handling
could be moved into the new debugger.c?
Jan
|