All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Remove unconditional arch dependency on asm/debugger.h
@ 2021-08-18 20:29 Bobby Eshleman
  2021-08-18 20:29 ` [PATCH v3 1/6] arm/traps: remove debugger_trap_fatal() calls Bobby Eshleman
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Bobby Eshleman @ 2021-08-18 20:29 UTC (permalink / raw)
  To: xen-devel
  Cc: Bobby Eshleman, Stefano Stabellini, Julien Grall,
	Volodymyr Babchuk, Jan Beulich, Andrew Cooper,
	Roger Pau Monné,
	Wei Liu, Elena Ufimtseva, Jun Nakajima, Kevin Tian,
	George Dunlap, Ian Jackson

This series removes the unconditional requirement that all architectures
implement asm/debugger.h. It additionally removes arm's debugger.h and
disentangles some of the x86 gdbsx/gdbstub/generic debugger code.

Additionally, this series does the following:
- Provides generic stubs when !CONFIG_CRASH_DEBUG
- Adds stronger separation between gdbstub, gdbsx, and generic debugger
  code.

The patches in this v3 are quite a bit different than in v2, so
per-patch changes are omitted. This difference in the patchset version
is largely due to the need to decouple the debugger_trap_* functions.

Changes from v2:
- The first patch drops ARM's calls to the debugger stubs, removing the
  need to add fake values.
- No debugger.c is added, as it was unnecessary when code was moved into
  existing and appropriate files.
- debugger_trap_entry() expands inline into its few call sites
- debug.c becomes gdbsx.c
- All gdbsx functions move into gdbsx.c and become dependent on
  CONFIG_GDBSX (instead of CONFIG_CRASH_DEBUG as was the case for
  domain_pause_for_debugger(), for example)

It's worth noting that debugger.h is still not truly generic as
debugger_trap_fatal() for x86 necessarily calls into the gdbstub… but
further generalization is unnecessary while it is still only
backed by the gdbstub.

As I'm not *exactly* an expert on this code, so feel free to inform me of my
confusion where you see it.

Bobby Eshleman (6):
  arm/traps: remove debugger_trap_fatal() calls
  x86/debugger: separate Xen and guest debugging debugger_trap_*
    functions
  arch/x86: rename debug.c to gdbsx.c
  x86/gdbsx: expand dbg_rw_mem() inline
  arch/x86: move domain_pause_for_debugger() to domain.h
  x86: change asm/debugger.h to xen/debugger.h

 xen/arch/arm/traps.c              |  7 ----
 xen/arch/x86/Makefile             |  2 +-
 xen/arch/x86/domain.c             |  2 +-
 xen/arch/x86/domctl.c             | 12 +-----
 xen/arch/x86/{debug.c => gdbsx.c} | 30 +++++++-------
 xen/arch/x86/hvm/svm/svm.c        |  2 +-
 xen/arch/x86/hvm/vmx/realmode.c   |  2 +-
 xen/arch/x86/hvm/vmx/vmx.c        |  2 +-
 xen/arch/x86/nmi.c                |  1 -
 xen/arch/x86/traps.c              | 51 ++++++++++++++----------
 xen/common/domain.c               |  2 +-
 xen/common/gdbstub.c              |  2 +-
 xen/common/keyhandler.c           |  2 +-
 xen/common/shutdown.c             |  2 +-
 xen/drivers/char/console.c        |  2 +-
 xen/include/asm-arm/debugger.h    | 15 -------
 xen/include/asm-x86/debugger.h    | 65 +------------------------------
 xen/include/asm-x86/domain.h      |  2 +
 xen/include/asm-x86/gdbsx.h       | 17 ++++++++
 xen/include/xen/debugger.h        | 51 ++++++++++++++++++++++++
 20 files changed, 127 insertions(+), 144 deletions(-)
 rename xen/arch/x86/{debug.c => gdbsx.c} (89%)
 delete mode 100644 xen/include/asm-arm/debugger.h
 create mode 100644 xen/include/asm-x86/gdbsx.h
 create mode 100644 xen/include/xen/debugger.h

-- 
2.32.0



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-08-24 14:35 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 20:29 [PATCH v3 0/6] Remove unconditional arch dependency on asm/debugger.h Bobby Eshleman
2021-08-18 20:29 ` [PATCH v3 1/6] arm/traps: remove debugger_trap_fatal() calls Bobby Eshleman
2021-08-24 12:45   ` Julien Grall
2021-08-18 20:29 ` [PATCH v3 2/6] x86/debugger: separate Xen and guest debugging debugger_trap_* functions Bobby Eshleman
2021-08-24 11:26   ` Andrew Cooper
2021-08-24 12:16   ` Jan Beulich
2021-08-24 12:41     ` Andrew Cooper
2021-08-24 13:07       ` Jan Beulich
2021-08-18 20:29 ` [PATCH v3 3/6] arch/x86: rename debug.c to gdbsx.c Bobby Eshleman
2021-08-24 11:31   ` Andrew Cooper
2021-08-24 12:19   ` Jan Beulich
2021-08-24 14:32     ` Bobby Eshleman
2021-08-18 20:29 ` [PATCH v3 4/6] x86/gdbsx: expand dbg_rw_mem() inline Bobby Eshleman
2021-08-24 11:32   ` Andrew Cooper
2021-08-24 12:21   ` Jan Beulich
2021-08-18 20:29 ` [PATCH v3 5/6] arch/x86: move domain_pause_for_debugger() to domain.h Bobby Eshleman
2021-08-24 12:26   ` Jan Beulich
2021-08-18 20:29 ` [PATCH v3 6/6] x86: change asm/debugger.h to xen/debugger.h Bobby Eshleman
2021-08-24 11:40   ` Andrew Cooper
2021-08-24 12:48   ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.