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

Re: [PATCH v4 01/11] drivers/char: Add support for USB3 DbC debugger


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 15 Aug 2022 14:58:30 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mB8d9Pp9S8PVTNL3C/vBJjYZXHU6qfqdKwNKoJJCFm0=; b=d2+hZOwgioiR1eE/dqC8HX6HfoQl8jmGfGnreNAUwbf182dJTVAf1e1v8VEPvMPPhKCGyH7RTXfZ4/FwyEnsxrWKHWlhVxFXkdmuGJGryUiJVeLCtCATpMNybY9WGTfs/M/gfK/4S7yV5NHIaLK/u0oaQLS7Kbz+4lc/VoxwOMbIBVRrVOlojuDtN686p8bWH3HRnwIrnwYqCH58GNRjJgwb7ZPEmwR2I1Eij42bjgtJoXwTx0hWH46uMIrxefXsbbgCYfmWh00vOjBhfKaOFOa4uKVWWbibKImJ3i9pfU6odhJazG670vlRVH80T2ZeNLLwpNDpSZgoxcu1/mhWVg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fjXs6+H19rxyGafd4grHG4aMnEXq0IBICN+a0MXlqThBePPUFW6B+bswFQJ9hpa41VCNuHbBTjf6vA6EIeotQNThSW3/+hpVcZl1gfM1fC9GLTXCtiDQn5GlNpMaINi/ynEiKAcZOLqEKXr5+cKvHSLhEkOMDf/IxTMATfU9HDsUiVmdjepf2g5khWF2tMq/dZXEssxk3WnGuGXoUix2T89NByZUtifc7w+TNR3HnmicmHXErW6nV5k1RmnZPN5X9pRSWBIMVsogSZuTGwRq5F8yBfB4WEyPXhJGMmMiXBnbgJXjmoEO7hzOehy+NymmsYLRxNzQJjjDtiJv84wPNw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 15 Aug 2022 12:58:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.08.2022 03:38, Marek Marczykowski-Górecki wrote:
> From: Connor Davis <davisc@xxxxxxxxxxxx>
> 
> [Connor]
> Xue is a cross-platform USB 3 debugger that drives the Debug
> Capability (DbC) of xHCI-compliant host controllers. This patch
> implements the operations needed for xue to initialize the host
> controller's DbC and communicate with it. It also implements a struct
> uart_driver that uses xue as a backend. Note that only target -> host
> communication is supported for now. To use Xue as a console, add
> 'console=dbgp dbgp=xhci' to the command line.
> 
> [Marek]
> The Xue driver is taken from https://github.com/connojd/xue and heavily
> refactored to fit into Xen code base. Major changes include:
> - rename to xhci_dbc
> - drop support for non-Xen systems
> - drop xue_ops abstraction
> - use Xen's native helper functions for PCI access
> - move all the code to xue.c, drop "inline"
> - build for x86 only
> - annotate functions with cf_check
> - adjust for Xen's code style
> 
> At this stage, only the first xHCI is considered, and only output is
> supported. Later patches add support for choosing specific device, and
> input handling.
> The driver is initiallized before memory allocator works, so all the
> transfer buffers (about 230KiB of them) are allocated statically and will
> use memory even if XUE console is not selected. The driver can be
> disabled build time to reclaim this memory.
> Most of this memory is shared with the controller via DMA. Later patch
> will adjust structures placement to avoid anything else to be placed on
> those DMA-reachable pages. This also means str_buf cannot use static
> initializer, without reserving (at least) a whole page page in .data (or
> more, when combined with other structures).

While I still don't buy that the strings used here can't live next to
other string literals, ...

> Signed-off-by: Connor Davis <davisc@xxxxxxxxxxxx>
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

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