[PATCH v6 00/10] Add Xue - console over USB 3 Debug Capability

Marek Marczykowski-Górecki posted 10 patches 1 year, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.00134d06d2e52e209e9f7778513a27cf0b2a3bd3.1662124370.git-series.marmarek@invisiblethingslab.com
Test gitlab-ci passed
There is a newer version of this series
docs/misc/xen-command-line.pandoc        |  30 +-
xen/drivers/char/Kconfig                 |  11 +-
xen/drivers/char/console.c               |  98 ++++--
xen/drivers/char/ehci-dbgp.c             |  15 +-
xen/drivers/char/serial.c                |   6 +-
xen/drivers/char/xhci-dbc.c              | 364 +++++++++++++++++++++---
xen/drivers/passthrough/amd/iommu_acpi.c |  21 +-
xen/drivers/passthrough/iommu.c          |  46 +++-
xen/drivers/passthrough/vtd/dmar.c       | 201 +++++++------
xen/include/xen/iommu.h                  |  14 +-
xen/include/xen/serial.h                 |   4 +-
11 files changed, 652 insertions(+), 158 deletions(-)
[PATCH v6 00/10] Add Xue - console over USB 3 Debug Capability
Posted by Marek Marczykowski-Górecki 1 year, 8 months ago
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 driver developed by Connor supports console via USB3 debug capability. The
capability is designed to operate mostly independently of normal XHCI driver,
so this patch series allows dom0 to drive standard USB3 controller part, while
Xen uses DbC for console output.

Changes since RFC:
 - move the driver to xue.c, remove non-Xen parts, remove now unneeded abstraction
 - adjust for Xen code style
 - build for x86 only
 - drop patch hidding the device from dom0
Changes since v1:
 - drop ehci patch - already applied
 - adjust for review comments from Jan (see changelogs in individual patches)
Changes since v2:
 - add runtime option to share (or not) the controller with dom0 or other domains
 - add RX support
 - several smaller changes according to review comments
Changes since v3:
 - put controller sharing behind experimental kconfig option
 - several other changes according to review comments
Changes since v4:
 - drop first 4 patches - already applied to staging
 - split dbgp=xhci into dbc=xhci
Changes since v5:
 - roll dbc=xhci back into dbgp=xhci, but make it work together with dbgp=ehci

Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <george.dunlap@citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien@xen.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Wei Liu <wl@xen.org>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Paul Durrant <paul@xen.org>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Connor Davis <connojdavis@gmail.com>

Marek Marczykowski-Górecki (10):
  drivers/char: allow using both dbgp=xhci and dbgp=ehci
  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
  drivers/char: mark DMA buffers as reserved for the XHCI
  drivers/char: add RX support to the XHCI driver
  drivers/char: allow driving the rest of XHCI by a domain while Xen uses DbC
  drivers/char: fix handling cable re-plug in XHCI console driver
  drivers/char: use smp barriers in xhci driver

 docs/misc/xen-command-line.pandoc        |  30 +-
 xen/drivers/char/Kconfig                 |  11 +-
 xen/drivers/char/console.c               |  98 ++++--
 xen/drivers/char/ehci-dbgp.c             |  15 +-
 xen/drivers/char/serial.c                |   6 +-
 xen/drivers/char/xhci-dbc.c              | 364 +++++++++++++++++++++---
 xen/drivers/passthrough/amd/iommu_acpi.c |  21 +-
 xen/drivers/passthrough/iommu.c          |  46 +++-
 xen/drivers/passthrough/vtd/dmar.c       | 201 +++++++------
 xen/include/xen/iommu.h                  |  14 +-
 xen/include/xen/serial.h                 |   4 +-
 11 files changed, 652 insertions(+), 158 deletions(-)

base-commit: e997d055929665b12246e89eb092dc79c65de9a4
-- 
git-series 0.9.1

Re: [PATCH v6 00/10] Add Xue - console over USB 3 Debug Capability
Posted by Jan Beulich 1 year, 7 months ago
On 02.09.2022 15:17, Marek Marczykowski-Górecki wrote:
> Marek Marczykowski-Górecki (10):
>   drivers/char: allow using both dbgp=xhci and dbgp=ehci
>   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
>   drivers/char: mark DMA buffers as reserved for the XHCI
>   drivers/char: add RX support to the XHCI driver
>   drivers/char: allow driving the rest of XHCI by a domain while Xen uses DbC
>   drivers/char: fix handling cable re-plug in XHCI console driver
>   drivers/char: use smp barriers in xhci driver

I wonder in how far it would be possible to commit parts of this series.
Aiui patches 3-6 belong together (lacking a suitable ack on 4), but are
independent of 1 and 2. What I can't really tell is whether 7-9 are
independent of 1-6 and could hence go in.

Jan

Re: [PATCH v6 00/10] Add Xue - console over USB 3 Debug Capability
Posted by Marek Marczykowski-Górecki 1 year, 7 months ago
On Tue, Sep 06, 2022 at 05:11:24PM +0200, Jan Beulich wrote:
> On 02.09.2022 15:17, Marek Marczykowski-Górecki wrote:
> > Marek Marczykowski-Górecki (10):
> >   drivers/char: allow using both dbgp=xhci and dbgp=ehci
> >   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
> >   drivers/char: mark DMA buffers as reserved for the XHCI
> >   drivers/char: add RX support to the XHCI driver
> >   drivers/char: allow driving the rest of XHCI by a domain while Xen uses DbC
> >   drivers/char: fix handling cable re-plug in XHCI console driver
> >   drivers/char: use smp barriers in xhci driver
> 
> I wonder in how far it would be possible to commit parts of this series.
> Aiui patches 3-6 belong together (lacking a suitable ack on 4), but are
> independent of 1 and 2. What I can't really tell is whether 7-9 are
> independent of 1-6 and could hence go in.

7 share some context with at least patches 1 and 8 (but no functional
dependency), and 9 modifies what 7 adds. But otherwise 7-9 should be
independent of 2-6.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
Re: [PATCH v6 00/10] Add Xue - console over USB 3 Debug Capability
Posted by Jan Beulich 1 year, 7 months ago
On 06.09.2022 18:05, Marek Marczykowski-Górecki wrote:
> On Tue, Sep 06, 2022 at 05:11:24PM +0200, Jan Beulich wrote:
>> On 02.09.2022 15:17, Marek Marczykowski-Górecki wrote:
>>> Marek Marczykowski-Górecki (10):
>>>   drivers/char: allow using both dbgp=xhci and dbgp=ehci
>>>   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
>>>   drivers/char: mark DMA buffers as reserved for the XHCI
>>>   drivers/char: add RX support to the XHCI driver
>>>   drivers/char: allow driving the rest of XHCI by a domain while Xen uses DbC
>>>   drivers/char: fix handling cable re-plug in XHCI console driver
>>>   drivers/char: use smp barriers in xhci driver
>>
>> I wonder in how far it would be possible to commit parts of this series.
>> Aiui patches 3-6 belong together (lacking a suitable ack on 4), but are
>> independent of 1 and 2. What I can't really tell is whether 7-9 are
>> independent of 1-6 and could hence go in.
> 
> 7 share some context with at least patches 1 and 8 (but no functional
> dependency), and 9 modifies what 7 adds. But otherwise 7-9 should be
> independent of 2-6.

Well, if 7-9 don't easily apply on their own, then I guess I'll rather
not make an attempt. You may want to consider moving those ahead in v7.

Jan