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

[RFC PATCH 00/12] Add Xue - console over USB 3 Debug Capability



This is integration of https://github.com/connojd/xue into mainline Xen.
This patch series includes several patches that I made in the process, some are
very loosely related.

The RFC status is to collect feedback on the shape of this series, specifically:

1. The actual Xue driver is a header-only library. Most of the code is in a
series of inline functions in xue.h. I kept it this way, to ease integrating
Xue updates. That's also why I preserved its original code style. Is it okay,
or should I move the code to a .c file?

2. The xue.h file includes bindings for several other environments too (EFI,
Linux, ...). This is unused code, behind #ifdef. Again, I kept it to ease
updating. Should I remove it?

3. The adding of IOMMU reserverd memory is necessary even if "hiding" device
from dom0. Otherwise, VT-d will deny DMA. That's probably not the most elegant
solution, but Xen doesn't have seem to have provisions for devices doing DMA
into Xen's memory.

4. To preserve authorship, I included unmodified "drivers/char: Add support for
Xue USB3 debugger" commit from Connor, and only added my changes on top. This
means, with that this commit, the driver doesn't work yet (but it does
compile). Is it okay, or should I combine fixes into that commit and somehow
mark authorship in the commit message?

5. The last patch(es) enable using the controller by dom0, even when Xen
uses DbC part. That's possible, because the capability was designed
specifically to allow separate driver handle it, in parallel to unmodified xhci
driver (separate set of registers, pretending the port is "disconnected" for
the main xhci driver etc). It works with Linux dom0, although requires an awful
hack - re-enabling bus mastering behind dom0's backs. Is it okay to leave this
functionality as is, or guard it behind some cmdline option, or maybe remove
completely?

Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Cc: George Dunlap <george.dunlap@xxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Julien Grall <julien@xxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Wei Liu <wl@xxxxxxx>
Cc: "Roger Pau Monné" <roger.pau@xxxxxxxxxx>
Cc: Paul Durrant <paul@xxxxxxx>
Cc: Kevin Tian <kevin.tian@xxxxxxxxx>

Connor Davis (1):
  drivers/char: Add support for Xue USB3 debugger

Marek Marczykowski-Górecki (11):
  xue: annotate functions with cf_check
  xue: reset XHCI ports when initializing dbc
  xue: add support for selecting specific xhci
  ehci-dbgp: fix selecting n-th ehci controller
  console: support multiple serial console simultaneously
  IOMMU: add common API for device reserved memory
  IOMMU/VT-d: wire common device reserved memory API
  IOMMU/AMD: wire common device reserved memory API
  xue: mark DMA buffers as reserved for the device
  xue: prevent dom0 (or other domain) from using the device
  xue: allow driving the reset of XHCI by a domain while Xen uses DbC

 docs/misc/xen-command-line.pandoc        |    5 +-
 xen/arch/x86/include/asm/fixmap.h        |    4 +-
 xen/arch/x86/setup.c                     |    5 +-
 xen/drivers/char/Makefile                |    1 +-
 xen/drivers/char/console.c               |   58 +-
 xen/drivers/char/ehci-dbgp.c             |    2 +-
 xen/drivers/char/xue.c                   |  197 ++-
 xen/drivers/passthrough/amd/iommu_acpi.c |   16 +-
 xen/drivers/passthrough/iommu.c          |   40 +-
 xen/drivers/passthrough/vtd/dmar.c       |  203 +-
 xen/include/xen/iommu.h                  |   11 +-
 xen/include/xue.h                        | 1942 +++++++++++++++++++++++-
 12 files changed, 2387 insertions(+), 97 deletions(-)
 create mode 100644 xen/drivers/char/xue.c
 create mode 100644 xen/include/xue.h

base-commit: 49dd52fb1311dadab29f6634d0bc1f4c022c357a
-- 
git-series 0.9.1



 


Rackspace

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