From patchwork Sat Aug 13 01:38:50 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: 12942649 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 D53EEC25B0F for ; Sat, 13 Aug 2022 01:39:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.386014.621857 (Exim 4.92) (envelope-from ) id 1oMg7V-0000pm-Kd; Sat, 13 Aug 2022 01:39:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 386014.621857; Sat, 13 Aug 2022 01:39:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMg7V-0000pf-Hr; Sat, 13 Aug 2022 01:39:21 +0000 Received: by outflank-mailman (input) for mailman id 386014; Sat, 13 Aug 2022 01:39:20 +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 1oMg7T-0000pT-K0 for xen-devel@lists.xenproject.org; Sat, 13 Aug 2022 01:39:20 +0000 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bd1771b4-1aa8-11ed-bd2e-47488cf2e6aa; Sat, 13 Aug 2022 03:39:16 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 62ABB5C008F; Fri, 12 Aug 2022 21:39:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 12 Aug 2022 21:39:14 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 12 Aug 2022 21:39:12 -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: bd1771b4-1aa8-11ed-bd2e-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= 1660354754; x=1660441154; bh=jAU6/33E6J2XS8de59Iv1i+VWObk9wBkC+I uB7O8D+Y=; b=h6w9HADi6jpG+wiUwgqw3ee1CLWSqesO/HbEXaIZMM+tS5j0Uu4 apNy+IS1+UMHs1dDpJZsXlIBnHzPsU+M2mPf9U1qWldXt4XfIHXX79CMebTf9aIj uRjMa4uTVzWbF3VlBYzDZP7yx5VMS4CHNLfLLCV9Qm3aELxL/KsE8xAiqaVPz6SY StlesPWBleGEqxyE6whtMRLC6ZJhN9kHj4b/5tIn+tAYTQ8qojwiACkIUUMhnExG IjcqsYEgK//YMxW/YV4Ho+veMMsjmq23xK9C3AX79vCSmwOhajktXPP4HhguEHac aijA33/TyWJYRtV8+6pHli7POiyKH7Bma2A== 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=fm1; t=1660354754; x=1660441154; bh=jAU6/33E6J2XS 8de59Iv1i+VWObk9wBkC+IuB7O8D+Y=; b=JudS5PJmOQUDBz2j/IuQN6HawgboA LZikczMq4RxPH+f0mQSdnrwYMnrg7FyHZ2yDh8j1NAm1AOmRzZTBc2jWO5xGeR8M ouR8zvfTlF2/GJByhQxg5H3QnKp86vOdnYdqPHkAezoCYtBW5hKTyKpz+xJTEBAd CxZVuiQGCiH/ff+2OTlwsAvOQGj+08/HHBj2bNiHSCiUWtEkuSo+T9DqzG0VZ3Rj 6VfUY5RAIRdDJfA7zCxrqlad3yfkjGlvRizNaLy2SrRVOYdx+SrnZRTuc9ojQALG RHit3rd21mK+qwhJpaM51SiD1QASOdP8wfEkFYC5HN6Gm8PAwzprOY+3Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdegjedghedtucetufdoteggodetrfdotf 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 v4 00/11] Add Xue - console over USB 3 Debug Capability Date: Sat, 13 Aug 2022 03:38:50 +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 Changes since v3: - put controller sharing behind experimental kconfig option - several other 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 (10): drivers/char: reset XHCI ports when initializing dbc drivers/char: add support for selecting specific xhci drivers/char: make serial_parse_handle take const argument 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 docs/misc/xen-command-line.pandoc | 22 +- xen/arch/x86/include/asm/fixmap.h | 4 +- xen/arch/x86/setup.c | 1 +- xen/drivers/char/Kconfig | 31 +- xen/drivers/char/Makefile | 1 +- xen/drivers/char/console.c | 98 +- xen/drivers/char/serial.c | 2 +- xen/drivers/char/xhci-dbc.c | 1399 +++++++++++++++++++++++- 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 | 8 +- 13 files changed, 1740 insertions(+), 106 deletions(-) create mode 100644 xen/drivers/char/xhci-dbc.c base-commit: 6d6aee437e37fced0c49be97e08c30da873690fc