xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Support xen-driven USB3 debug capability
@ 2021-05-14  0:56 Connor Davis
  2021-05-14  0:56 ` [PATCH v2 1/4] usb: early: Avoid using DbC if already enabled Connor Davis
  2021-05-14  6:46 ` [PATCH v2 0/4] Support xen-driven USB3 debug capability Greg Kroah-Hartman
  0 siblings, 2 replies; 13+ messages in thread
From: Connor Davis @ 2021-05-14  0:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Connor Davis, linux-usb, xen-devel, Greg Kroah-Hartman,
	Lee Jones, Jann Horn, Chunfeng Yun, Boris Ostrovsky,
	Juergen Gross, Stefano Stabellini, Mathias Nyman,
	Douglas Anderson, Eric W. Biederman, Petr Mladek, Sumit Garg

Hi all,

This goal of this series is to allow the USB3 debug capability (DbC) to be
safely used by xen while linux runs as dom0.

The first patch prevents the early DbC driver from using an
already-running DbC.

The second exports xen_dbgp_reset_prep and xen_dbgp_external_startup
functions when CONFIG_XEN_DOM0 is enabled so they may be used by the
xHCI driver.

The third ensures that xen_dbgp_reset_prep/xen_dbgp_external_startup
return consistent values in failure cases. This inconsistency illustrated
another issue: dbgp_reset_prep returned the value of xen_dbgp_reset_prep
if it was nonzero, but callers of dbgp_reset_prep interpret nonzero
as "keep using the debug port" and would eventually (needlessly) call
dbgp_external_startup. Patch three _should_ fix this issue, but
I don't have any EHCI hardware available to test unfortunately.

The last uses the xen_dbgp_* functions to notify xen of unsafe periods
(e.g. reset and D3hot transition).

Thanks,
Connor

--
Changes since v1:
 - Added patch for dbgp return value fixes
 - Return -EPERM when !xen_initial_domain() in xen_dbgp_op
 - Moved #ifdef-ary out of xhci.c into xhci-dbgcap.h

--
Connor Davis (4):
  usb: early: Avoid using DbC if already enabled
  xen: Export dbgp functions when CONFIG_XEN_DOM0 is enabled
  usb: dbgp: Fix return values for reset prep and startup
  usb: xhci: Notify xen when DbC is unsafe to use

 drivers/usb/early/ehci-dbgp.c  |  9 ++++---
 drivers/usb/early/xhci-dbc.c   | 10 ++++++++
 drivers/usb/host/xhci-dbgcap.h | 19 ++++++++++++++
 drivers/usb/host/xhci.c        | 47 ++++++++++++++++++++++++++++++++++
 drivers/usb/host/xhci.h        |  1 +
 drivers/xen/dbgp.c             |  4 +--
 include/linux/usb/ehci-dbgp.h  | 14 ++++++----
 7 files changed, 94 insertions(+), 10 deletions(-)


base-commit: 88b06399c9c766c283e070b022b5ceafa4f63f19
-- 
2.31.1



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

end of thread, other threads:[~2021-05-19  5:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14  0:56 [PATCH v2 0/4] Support xen-driven USB3 debug capability Connor Davis
2021-05-14  0:56 ` [PATCH v2 1/4] usb: early: Avoid using DbC if already enabled Connor Davis
2021-05-14  0:56   ` [PATCH v2 2/4] xen: Export dbgp functions when CONFIG_XEN_DOM0 is enabled Connor Davis
2021-05-14 14:06     ` Connor Davis
2021-05-14  0:56   ` [PATCH v2 3/4] usb: dbgp: Fix return values for reset prep and startup Connor Davis
2021-05-14 15:33     ` Boris Ostrovsky
2021-05-17  9:32   ` [PATCH v2 1/4] usb: early: Avoid using DbC if already enabled Jan Beulich
2021-05-17 13:48     ` Connor Davis
2021-05-17 14:13       ` Jan Beulich
2021-05-17 14:24         ` Connor Davis
2021-05-18 21:50           ` Mathias Nyman
2021-05-14  6:46 ` [PATCH v2 0/4] Support xen-driven USB3 debug capability Greg Kroah-Hartman
2021-05-14 14:07   ` Connor Davis

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).