From patchwork Tue Jul 26 03:23:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 12928590 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6C04C43334 for ; Tue, 26 Jul 2022 03:23:50 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.374934.607148 (Exim 4.92) (envelope-from ) id 1oGBAQ-0003PD-QS; Tue, 26 Jul 2022 03:23:30 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 374934.607148; Tue, 26 Jul 2022 03:23:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oGBAQ-0003P6-NU; Tue, 26 Jul 2022 03:23:30 +0000 Received: by outflank-mailman (input) for mailman id 374934; Tue, 26 Jul 2022 03:23:29 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oGBAP-0003P0-Hv for xen-devel@lists.xenproject.org; Tue, 26 Jul 2022 03:23:29 +0000 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 50bfcbde-0c92-11ed-bd2d-47488cf2e6aa; Tue, 26 Jul 2022 05:23:28 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9C45D5C00C4; Mon, 25 Jul 2022 23:23:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 25 Jul 2022 23:23:27 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Jul 2022 23:23:25 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 50bfcbde-0c92-11ed-bd2d-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t= 1658805807; x=1658892207; bh=k9jiFqn51KOOI3U/+3qfkMWa6aFW6+VVMrP BEdhS56M=; b=vZ/QRA655qUHdCeHVhbIWlYnF8sVQCFTkJ+hbLLCueP1Baa+eT4 mhxPEX/IxsbTvyBzChMj9Zte3wswbYu2zn/cNuWhFIgPkNvzUWn3uZ+qHFWg8ZC+ HxWYU/S3n0U3gpwvhD+5tXdPar4bmnb+rastZ1RJacfQV9QhO7qpoQp3s1DcpAS6 LgG5P3E2pUJfIWaIUig8A0a2V0RmaHs3EKGJV8hD0gI9XzPLAawbXd1/MA/XS4Dg eaYeZ96UiI3ASUaA2xRq0A0ai5Bkx0WxUQmktBlJ4uN0h5JrV9KO3IzduB4UUA9O 5/3ExKBtc7I00L9FkxWjcKdqVPgwAFQ1yTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1658805807; x=1658892207; bh=k9jiFqn51KOOI 3U/+3qfkMWa6aFW6+VVMrPBEdhS56M=; b=J5x6/abGkbWhobYAAN2psLNxLWKEP oavtbI80Qta4m4ukptTuUuVTX/6BYklorcfYFkV86/+HzgnUYe4XrwfjhrbmpChs TPLsDKtXjFKfdfT9bG5OHS512bAIPTFLJtHi9kZX45GUbTyezB2qKT1mhpu5b9sU By9hDrgwk92/RI6AGFCsBOHAAhEIW2iZXtqvat4T8dEGC3BzOsmnF3v4Hyj9THlu +agFvjMj1xQo//7C0HeJ40YC9xa6DtWMLdxZpCYRF89Qp2seLA1wv0d5UVbYl0zU J7jNqMhJG8N4cOvS3rJei+EYrrtOUOjErKEEVDDTK2i8wEnorygIun5Iw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddtledgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofggtgfgsehtkeertdertdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefgffg geevhffggfetfefhffeuvefhvdevkeehkedttddtgeefkeduheevffduleenucffohhmrg hinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslh grsgdrtghomh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Paul Durrant , Kevin Tian , Connor Davis Subject: [PATCH v3 00/10] Add Xue - console over USB 3 Debug Capability Date: Tue, 26 Jul 2022 05:23:05 +0200 Message-Id: X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 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 Cc: Andrew Cooper Cc: George Dunlap Cc: Jan Beulich Cc: Julien Grall Cc: Stefano Stabellini Cc: Wei Liu Cc: "Roger Pau Monné" Cc: Paul Durrant Cc: Kevin Tian Cc: Connor Davis Connor Davis (1): drivers/char: Add support for USB3 DbC debugger Marek Marczykowski-Górecki (9): drivers/char: reset XHCI ports when initializing dbc drivers/char: add support for selecting specific xhci 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: allow driving the rest of XHCI by a domain while Xen uses DbC driver/char: add RX support to the XHCI driver docs/misc/xen-command-line.pandoc | 19 +- xen/arch/x86/include/asm/fixmap.h | 4 +- xen/arch/x86/setup.c | 1 +- xen/drivers/char/Kconfig | 20 +- xen/drivers/char/Makefile | 1 +- xen/drivers/char/console.c | 97 +- xen/drivers/char/xhci-dbc.c | 1367 +++++++++++++++++++++++- xen/drivers/passthrough/amd/iommu_acpi.c | 21 +- xen/drivers/passthrough/iommu.c | 45 +- xen/drivers/passthrough/vtd/dmar.c | 201 +-- xen/include/xen/iommu.h | 13 +- xen/include/xen/serial.h | 6 +- 12 files changed, 1690 insertions(+), 105 deletions(-) create mode 100644 xen/drivers/char/xhci-dbc.c base-commit: 4df2e99d731402da48afb19dc970ccab5a0814d6