From patchwork Tue Jun 7 14:30:06 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: 12872005 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 4260BC433EF for ; Tue, 7 Jun 2022 14:31:34 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.343345.568663 (Exim 4.92) (envelope-from ) id 1nyaEm-00061S-9j; Tue, 07 Jun 2022 14:31:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 343345.568663; Tue, 07 Jun 2022 14:31:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nyaEm-00061L-6M; Tue, 07 Jun 2022 14:31:16 +0000 Received: by outflank-mailman (input) for mailman id 343345; Tue, 07 Jun 2022 14:31:14 +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 1nyaEj-000619-Rs for xen-devel@lists.xenproject.org; Tue, 07 Jun 2022 14:31:14 +0000 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 797a938f-e66e-11ec-bd2c-47488cf2e6aa; Tue, 07 Jun 2022 16:31:11 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0F4E85C009E; Tue, 7 Jun 2022 10:31:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 07 Jun 2022 10:31:10 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Jun 2022 10:31:07 -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: 797a938f-e66e-11ec-bd2c-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=fm1; t= 1654612270; x=1654698670; bh=R7ACutaosRorqKmEfDpSiNv/WJ0bp2X+dUr jFXbFlLE=; b=BukLq8aYQVUqGFBvGB5c79tvLsRiyYeFEkyTZT987Q1vGIUU/IQ nNw/7jj9+a3OHve83km1Wch4tUWz3FdMLSJloYjOmtp45KwxXfWNJTBWju81Nbh7 8GYY29h82zR2/EyA9eAScOY/HxRGdCd2nmVg9CMpF+ESwel1NEmZaMb4sxN/QRFn GloNiIcQ2gwfLcXWpKiBhTgOH7xji6Jinz59Sb5PGGJTPKNM7CyZ/+m80k480MVe 8CyI5H2U7kUXcCaCCYfaNBROTFYFsREFWwqO9kHo0ndYqvSFKy3saen69cd6c7MC 3axYkp1Y94b4bE1UZNLsf/XfbZ9+Ex7N7pg== 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=fm2; t=1654612270; x=1654698670; bh=R7ACutaosRorq KmEfDpSiNv/WJ0bp2X+dUrjFXbFlLE=; b=BPf11H9T2WD6/YZ6LCN9RfvsvYZwa cJaurm1EnjUJb2N0cpTu8jTo3FRW3HJOxeuazNRwKnAW9bLEhXJXXRLuQMQ3cblH eJwsxIqg1CXzHsJydQwFqpI3bl9bf27ZTtQoxB/2LPcvlpvGccTWi0bY3OPL/ZHR V6jwZx6BDZe3a438HqxfhI3V/pxjkMB1Xq9hpwoLw/9/AnLiuL1pwuotc41EEM+E jrmJr9/uWHyI4AL4wOrs5ED5QuiuNVn5RgJ46Jilu5uzbWHfnyH7ML73PvCRjpSZ ldD4w2KoBpEcReQL27q9UKqXoYnk4Cwd7a4PudsTqX8uTTkRV6TIglnqQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddthedgjeeiucetufdoteggodetrfdotf 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 v1 00/10] Add Xue - console over USB 3 Debug Capability Date: Tue, 7 Jun 2022 16:30:06 +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 output-only 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 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 Xue USB3 debugger Marek Marczykowski-Górecki (9): 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: allow driving the rest of XHCI by a domain while Xen uses DbC docs/misc/xen-command-line.pandoc | 5 +- xen/arch/x86/Kconfig | 1 +- xen/arch/x86/include/asm/fixmap.h | 4 +- xen/arch/x86/setup.c | 1 +- xen/drivers/char/Kconfig | 7 +- xen/drivers/char/Makefile | 1 +- xen/drivers/char/console.c | 58 +- xen/drivers/char/ehci-dbgp.c | 2 +- xen/drivers/char/xue.c | 1089 +++++++++++++++++++++++- 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/xen/serial.h | 1 +- 14 files changed, 1342 insertions(+), 97 deletions(-) create mode 100644 xen/drivers/char/xue.c base-commit: 49dd52fb1311dadab29f6634d0bc1f4c022c357a Tested-by: Tamas K Lengyel