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

Currently, any architecture wishing to use common/ is likely
to be required to implement the functions found in "asm/debugger.h".
Some architectures, however, do not have an actual use for these
functions and so are forced to implement stubs.  This patch does the
following:

* Supplies common stubs if !CONFIG_CRASH_DEBUG for any architecture,
  removing the need for all new architectures to have "asm/debugger.h".
* Moves parts of the x86 implementation to "arch/x86/debugger.c".
* Removes the ARM calls to its stubs.
* Centralizes non-inlined x86 code conditionally compiled by CONFIG_CRASH_DEBUG
  into arch/x86/debugger.c, which is now conditionally built for
  CONFIG_CRASH_DEBUG via Kbuild (i.e., obj-$(CONFIG_CRASH_DEBUG)).
* Tries to improve the x86 implementation by not inlining large
  functions (but preserving inlining for those that seemed "small").

Bobby Eshleman (4):
  arm/traps: remove debugger_trap_fatal() calls
  build: use common stubs for debugger_trap_* functions if
    !CONFIG_CRASH_DEBUG
  x86/debug: move debugger_trap_entry into debugger.c not inlined
  x86/debug: move domain_pause_for_debugger to debugger.c

 xen/arch/arm/traps.c            |  8 +--
 xen/arch/x86/Makefile           |  1 +
 xen/arch/x86/debug.c            |  2 +-
 xen/arch/x86/debugger.c         | 53 ++++++++++++++++++++
 xen/arch/x86/domain.c           | 15 +-----
 xen/arch/x86/domctl.c           |  2 +-
 xen/arch/x86/gdbstub.c          |  4 +-
 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              |  2 +-
 xen/arch/x86/traps.c            |  2 +-
 xen/arch/x86/x86_64/gdbstub.c   |  3 +-
 xen/common/domain.c             |  2 +-
 xen/common/gdbstub.c            |  3 +-
 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  | 86 ++++++---------------------------
 xen/include/xen/debugger.h      | 69 ++++++++++++++++++++++++++
 21 files changed, 157 insertions(+), 122 deletions(-)
 create mode 100644 xen/arch/x86/debugger.c
 delete mode 100644 xen/include/asm-arm/debugger.h
 create mode 100644 xen/include/xen/debugger.h

-- 
2.30.0



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

end of thread, other threads:[~2021-07-16  7:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 20:37 [PATCH v2 0/4] Remove unconditional arch dependency on asm/debugger.h Bobby Eshleman
2021-07-14 20:37 ` [PATCH v2 1/4] arm/traps: remove debugger_trap_fatal() calls Bobby Eshleman
2021-07-15  6:31   ` Jan Beulich
2021-07-14 20:37 ` [PATCH v2 2/4] build: use common stubs for debugger_trap_* functions if !CONFIG_CRASH_DEBUG Bobby Eshleman
2021-07-15 15:18   ` Jan Beulich
2021-07-16  7:33     ` Julien Grall
2021-07-14 20:37 ` [PATCH v2 3/4] x86/debug: move debugger_trap_entry into debugger.c not inlined Bobby Eshleman
2021-07-15 15:21   ` Jan Beulich
2021-07-14 20:37 ` [PATCH v2 4/4] x86/debug: move domain_pause_for_debugger to debugger.c Bobby Eshleman
2021-07-15 15:28   ` Jan Beulich
2021-07-15 19:33 ` [PATCH v2 0/4] Remove unconditional arch dependency on asm/debugger.h Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).