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 D0960C433EF for ; Thu, 14 Oct 2021 14:50:25 +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 861F460F23 for ; Thu, 14 Oct 2021 14:50:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 861F460F23 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.209433.365891 (Exim 4.92) (envelope-from ) id 1mb23g-0005YR-5Q; Thu, 14 Oct 2021 14:50:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 209433.365891; Thu, 14 Oct 2021 14:50:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mb23g-0005YK-2G; Thu, 14 Oct 2021 14:50:12 +0000 Received: by outflank-mailman (input) for mailman id 209433; Thu, 14 Oct 2021 14:50:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mb23e-0005YC-Ju for xen-devel@lists.xenproject.org; Thu, 14 Oct 2021 14:50:10 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 5268b51a-28d4-418a-a4ee-cd0b07e9521b; Thu, 14 Oct 2021 14:50:09 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C5889D6E; Thu, 14 Oct 2021 07:50:08 -0700 (PDT) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 225A23F694; Thu, 14 Oct 2021 07:50:07 -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: 5268b51a-28d4-418a-a4ee-cd0b07e9521b From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: iwj@xenproject.org, Paul Durrant , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , George Dunlap , Anthony PERARD , Juergen Gross Subject: [PATCH v6 0/3] PCI devices passthrough on Arm Date: Thu, 14 Oct 2021 15:49:48 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hello All, This serie is a follow up on Rahul serie where we included various fixes required after review on the mailing list and a new patch to move some of the x86 ecam related code to the common vpci code. Most of the patches of the original serie have been merged and this serie includes only 2 of the original patches reworked and 1 new patch: Move some ECAM related functions from x86 to generic vpci implementation: - move vcpi mmcfg_{read/write} and vpci_access_allowed to common vpci.c. - use ecam instead of mmcfg in common code. Enable the existing x86 virtual PCI support for ARM: - Add VPCI trap handler for each of the PCI device added for config space access. - Register the trap handler in XEN for each of the host bridge PCI ECAM config space access. Emulated PCI device tree node in libxl: - Create a virtual PCI device tree node in libxl to enable the guest OS to discover the virtual PCI during guest boot. The patch modifying xc_domain_ioport_permission has been removed from the serie. Bertrand Marquis (1): xen/vpci: Move ecam access functions to common code Rahul Singh (2): xen/arm: Enable the existing x86 virtual PCI support for ARM. arm/libxl: Emulated PCI device tree node in libxl tools/libs/light/libxl_arm.c | 105 +++++++++++++++++++++++++++++++ tools/libs/light/libxl_types.idl | 1 + xen/arch/arm/Makefile | 1 + xen/arch/arm/domain.c | 4 ++ xen/arch/arm/vpci.c | 74 ++++++++++++++++++++++ xen/arch/arm/vpci.h | 36 +++++++++++ xen/arch/x86/hvm/io.c | 50 +++------------ xen/drivers/passthrough/pci.c | 18 +++++- xen/drivers/vpci/header.c | 3 +- xen/drivers/vpci/vpci.c | 60 ++++++++++++++++++ xen/include/asm-arm/domain.h | 1 + xen/include/asm-x86/pci.h | 2 - xen/include/public/arch-arm.h | 17 +++++ xen/include/xen/pci.h | 3 + xen/include/xen/vpci.h | 10 +++ 15 files changed, 338 insertions(+), 47 deletions(-) create mode 100644 xen/arch/arm/vpci.c create mode 100644 xen/arch/arm/vpci.h -- 2.25.1