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

Re: [PATCH v3 6/6] x86: change asm/debugger.h to xen/debugger.h


  • To: Bobby Eshleman <bobby.eshleman@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 24 Aug 2021 12:40:03 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=XG/fbwnPrTM30Rkgzh56dT24dm44KQsvFp/l9APT/dk=; b=e3AOu5/yAmr1UbUjF9II+OhSyFLnQDUq0B9xMDF6MEDBu5LefihkIiGKoJruq8CaSOsd1YOlqpHDvWaHxpmbKNk74Yrq8fTz/J9zk0e4OSH9HIR794B99KqMdv+ZTAELrGXncTZ90vfRwcTPYdqnVNpd0+rvR/zXO6wAoRYsnti9UMtaKRwkBpuQNT3j+dqcfLjZRM42dXj+3rWEQ+Q5sfFG1YAp+mzZ/2Tx+Cfqq+CDVT15Z0WudWErIE/oqCd+n1Gi1S0CokuhuPNixotnuoJ4IsPCXeZ/iywb//QPybwYlkfjv/RUhBqPsUhX50B0tGBML6QChS/jCPTGG26smQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bXQImHBh0PjyLtLVbsMGrMvwdtsmHVRK4OXhZKIqfKGYyIuOqkGmPXAWQygg7vQ3KCHLeRg4pv9GQFqCdd+OCyOuX2QHE3ilF2h+JjW1gwQeEQUPppRbPJ8/gTyuERra1TuYvccLOt41T8t7ogJLzOCfq9X6QZp5Udlva8pO/wzF3LXflfsc/Y0vxy5C6tI5cNBZw87D8lH2ZVd5auJAQWe3EeHPpy2wwT2NKCpm5sowb/tAsfgLrbWrpBIgln7xahzYlY/tzuKRfTF7/BY2o+n1FBCK/DlsgFfn/jFz0VMCiabP8kBSxoa0vLlGhxS84MGgi6urCG4NWNB7V8L94g==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • Delivery-date: Tue, 24 Aug 2021 11:40:51 +0000
  • Ironport-hdrordr: A9a23:1yGcYKjQPU2nTGlyniYvyQtP/nBQX1913DAbv31ZSRFFG/FwyP rAoB1L73PJYWgqNU3I+ergBEGBKUmskaKdkrNhQotKOzOWxFdATbsSkLcKpgePJ8SQzJ8k6U 4NSdkZNDS0NykBsS+Y2njJLz9D+qj/zEnAv463pB0MPGIaGZ2IrT0JbTpzencGNTWubqBJdq Z0iPA3wgZINU5nFfhSURI+Lpb+TpDw5dzbiVlsPW9Q1CC+yReTrJLqGRmR2RkTFxtJ3LcZ6G DA1yj0/L+qvf2XwgLVkza71eUXpPLRjv94QOCcgMkcLTvhzi6ueYRaQrWH+BQ4uvum5loGmM TF5z0gI8NwwXXMeXzdm2qt5yDQlBIVr1Pyw16RhnXu5eT/WTIBEsJEwblUdxPIgnBQ8e1U4e Zu5Sa0ppBXBRTPkGDW/N7TTSxnkUKyvD4LjfMTp2Y3a/paVJZh6agkuG9FGpYJGyz3rKo9Fv N1Mc3a7PFKNXuHcnHiuHV1ytDEZAVwIv6/eDlEhiWp6UkRoJggpHFonfD3301wt67VcqM0o9 gtac9T5elzpqZ8V9MPOA8DKfHHQFAlDyi8a157jDzcZeg60kn22urKCYMOlaqXkawzve4Pca v6ISRlXE4JCg7T4J61rdJ2Gi6kehT0Yd2q8LAF26RE
  • Ironport-sdr: ftvs9FKHZst2zFUwFzoZZXtcmRoPb9CpggDswphX7RS+tzpFDMCMPBBRbrLLVifaWaqKXeWsWi E8lSmquO7u8Ct3oU1QRUQs1IdTA/1M6kUFQe7Ni3LRrrP5bu1YApGyBl2VAaTW+e6eARKUP/nZ 2o5DPmveiqyy+YWdWTT17q1yh4All923IUuno9BaX2OmQD5kcfyejX+Q3F7o4cWdt3T2/FUXw7 495wAIvqgUK5fEvglzPu134FGGD5cIhFOTeIOFasj4K5xz0OX8TSAhU70dV8EU/mkxkugOoGnK /aszzCEhwn12O3XMhHKKEwo3
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18/08/2021 21:29, Bobby Eshleman wrote:
> diff --git a/xen/include/xen/debugger.h b/xen/include/xen/debugger.h
> new file mode 100644
> index 0000000000..166fad9d2e
> --- /dev/null
> +++ b/xen/include/xen/debugger.h
> @@ -0,0 +1,51 @@
> +/******************************************************************************
> + * Generic hooks into arch-dependent Xen.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; If not, see <http://www.gnu.org/licenses/>.
> + *
> + * Each debugger should define two functions here:
> + *
> + * 1. debugger_trap_fatal():
> + *  Called when Xen is about to give up and crash. Typically you will use 
> this
> + *  hook to drop into a debug session. It can also be used to hook off
> + *  deliberately caused traps (which you then handle and return non-zero).
> + *
> + * 2. debugger_trap_immediate():
> + *  Called if we want to drop into a debugger now.  This is essentially the
> + *  same as debugger_trap_fatal, except that we use the current register 
> state
> + *  rather than the state which was in effect when we took the trap.
> + *  For example: if we're dying because of an unhandled exception, we call
> + *  debugger_trap_fatal; if we're dying because of a panic() we call
> + *  debugger_trap_immediate().
> + */
> +
> +#ifndef __XEN_DEBUGGER_H__
> +#define __XEN_DEBUGGER_H__
> +
> +#ifdef CONFIG_CRASH_DEBUG
> +
> +#include <asm/debugger.h>
> +
> +#else
> +
> +#include <asm/regs.h>

This include should be deleted, and replaced with simply

struct cpu_user_regs;

~Andrew

> +
> +static inline bool debugger_trap_fatal(
> +    unsigned int vector, const struct cpu_user_regs *regs)
> +{
> +    return false;
> +}
> +
> +static inline void debugger_trap_immediate(void)
> +{
> +}
> +
> +#endif /* CONFIG_CRASH_DEBUG */
> +
> +#endif /* __XEN_DEBUGGER_H__ */




 


Rackspace

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