From patchwork Fri Oct 8 05:55:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Andrushchenko X-Patchwork-Id: 12544417 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D58DC433FE for ; Fri, 8 Oct 2021 05:56:01 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 680FF60F46 for ; Fri, 8 Oct 2021 05:56:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 680FF60F46 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.204328.359460 (Exim 4.92) (envelope-from ) id 1mYir8-0007cN-0I; Fri, 08 Oct 2021 05:55:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 204328.359460; Fri, 08 Oct 2021 05:55:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mYir7-0007cG-T8; Fri, 08 Oct 2021 05:55:41 +0000 Received: by outflank-mailman (input) for mailman id 204328; Fri, 08 Oct 2021 05:55:41 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mYir6-0007cA-SH for xen-devel@lists.xenproject.org; Fri, 08 Oct 2021 05:55:40 +0000 Received: from mail-lf1-x12b.google.com (unknown [2a00:1450:4864:20::12b]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9101059a-f8f1-44a8-a5f6-33a06cc19648; Fri, 08 Oct 2021 05:55:39 +0000 (UTC) Received: by mail-lf1-x12b.google.com with SMTP id t9so33576715lfd.1 for ; Thu, 07 Oct 2021 22:55:39 -0700 (PDT) Received: from localhost.localdomain (host-176-36-245-220.b024.la.net.ua. [176.36.245.220]) by smtp.gmail.com with ESMTPSA id f8sm151147lfq.168.2021.10.07.22.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 22:55:37 -0700 (PDT) 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: 9101059a-f8f1-44a8-a5f6-33a06cc19648 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VysqxQApJGno/WIkIxWmmKVDKvdviGneK1iv6SsMayM=; b=acvElKnNqP0avJnh0bgC/ZPIGwkgWeQx644wQ+xYjVcIThzM7/7GmFBqVIUMpCEptO 742IWZZrnFwdGrC+twKQ3ppZwDJKBlcd3JxdSThM1CheELOpZIrH3fF9R3nWHqj6z791 P928bPebowEIeyFLRNKZrHT716VY+Ng36CroilYUfEvxJYsemC3gRMQCpwhf8jWxElWz JUkJe1+9/DHINfhmxOPtEjZVfhMO82USwqw9SkQj2K+4b3jmlYQpVkq1Ruoh4+cvBu6g PRTfKVQUkF765S1Rtspj92BmzqMulElaGWZYtJMW3jV9pH5NU4FYaWAxhBq4VDwqus1N Fc5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VysqxQApJGno/WIkIxWmmKVDKvdviGneK1iv6SsMayM=; b=4OOML4qdr9W/lHzj4R9ZrlCv4E7bQ3N1zxHYcIwwF0cN7jo2UHrveMr1ibQRrHJTHL FbPT4Iy7JSnFudk+KlM7j+8rqOOlk65iHE5MHVModx7ODynmSNbUZCMIkrNZQOay1c8K aWDX27LPD1J0sWaMsDi6tqFagsQoPr2UtNQzXLJRzzykFmV8py3qRcIxAVv4iE2qFEg7 /lIUMpdlDazF4mxAsKkkP32CqRc6JCyslQ8fbqEAmbeF5K8QBK3KI9IJ06ckgrEgJ1lG hJ5Q7Ba9/o+sS8MU0EUkel2u1cexzRjDq5TS8uOPapSx5nVeHapbFrzO8QZFFBMD2/MX qfww== X-Gm-Message-State: AOAM5320JLjM3Zc48NNbNy0MPV3a8CnkZ2761uPH8FlbkE6h7OWi4kdJ lnFP4FsYMQ82mQBEqDA3YztXRmT2Qps= X-Google-Smtp-Source: ABdhPJw5JgZNGwFi7iN743DxVBkkChQmgar0GiVWcT4Du15n0QJT+jgbrKZnuNV5RdjqReji186gDQ== X-Received: by 2002:a05:6512:3f18:: with SMTP id y24mr8780631lfa.263.1633672538234; Thu, 07 Oct 2021 22:55:38 -0700 (PDT) From: Oleksandr Andrushchenko To: xen-devel@lists.xenproject.org Cc: julien@xen.org, sstabellini@kernel.org, oleksandr_tyshchenko@epam.com, volodymyr_babchuk@epam.com, Artem_Mygaiev@epam.com, roger.pau@citrix.com, jbeulich@suse.com, andrew.cooper3@citrix.com, george.dunlap@citrix.com, paul@xen.org, bertrand.marquis@arm.com, rahul.singh@arm.com, Oleksandr Andrushchenko Subject: [PATCH v5 00/10] PCI devices passthrough on Arm, part 2 Date: Fri, 8 Oct 2021 08:55:25 +0300 Message-Id: <20211008055535.337436-1-andr2000@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 From: Oleksandr Andrushchenko Hi, all! This is an assorted series of patches which aim is to make some further basis for PCI passthrough on Arm support. The series continues the work published earlier by Arm [1] and adds new helpers and clears the way for vPCI changes which will follow. RFC is at [2], [3]. Design presentation can be found at [4]. Thank you, Oleksandr [1] https://patchwork.kernel.org/project/xen-devel/list/?series=558681 [2] https://lists.xenproject.org/archives/html/xen-devel/2020-07/msg01184.html [3] https://lists.xenproject.org/archives/html/xen-devel/2020-07/threads.html#01184 [4] https://static.sched.com/hosted_files/xen2021/e4/PCI_Device_Passthrough_On_Arm.pdf Oleksandr Andrushchenko (9): xen/arm: Add new device type for PCI xen/arm: Introduce pci_find_host_bridge_node helper xen/device-tree: Make dt_find_node_by_phandle global xen/arm: Mark device as PCI while creating one libxl: Allow removing PCI devices for all types of domains libxl: Only map legacy PCI IRQs if they are supported xen/arm: Setup MMIO range trap handlers for hardware domain xen/arm: Do not map PCI ECAM and MMIO space to Domain-0's p2m xen/arm: Process pending vPCI map/unmap operations Oleksandr Tyshchenko (1): xen/domain: Call pci_release_devices() when releasing domain resources tools/libs/light/Makefile | 4 ++ tools/libs/light/libxl_pci.c | 15 ++++- xen/arch/arm/domain.c | 11 +++- xen/arch/arm/domain_build.c | 57 ++++++++++-------- xen/arch/arm/pci/ecam.c | 14 +++++ xen/arch/arm/pci/pci-host-common.c | 93 ++++++++++++++++++++++++++++++ xen/arch/arm/pci/pci-host-zynqmp.c | 1 + xen/arch/arm/pci/pci.c | 12 ++++ xen/arch/arm/traps.c | 13 +++++ xen/arch/arm/vpci.c | 34 +++++++++++ xen/arch/arm/vpci.h | 6 ++ xen/arch/x86/hvm/hvm.c | 6 ++ xen/common/device_tree.c | 2 +- xen/common/ioreq.c | 9 --- xen/drivers/passthrough/pci.c | 2 + xen/include/asm-arm/device.h | 4 +- xen/include/asm-arm/pci.h | 30 ++++++++++ xen/include/asm-arm/setup.h | 13 +++++ xen/include/asm-x86/pci.h | 2 + xen/include/xen/device_tree.h | 2 + 20 files changed, 292 insertions(+), 38 deletions(-)