From patchwork Wed Jan 23 18:27:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Knut Omang X-Patchwork-Id: 10777675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB56B913 for ; Wed, 23 Jan 2019 18:31:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C2782DA84 for ; Wed, 23 Jan 2019 18:31:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A3602DA85; Wed, 23 Jan 2019 18:31:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 433EC2DA8A for ; Wed, 23 Jan 2019 18:31:01 +0000 (UTC) Received: from localhost ([127.0.0.1]:39942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmNIi-0006dd-Gk for patchwork-qemu-devel@patchwork.kernel.org; Wed, 23 Jan 2019 13:31:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmNHH-0005NT-IL for qemu-devel@nongnu.org; Wed, 23 Jan 2019 13:29:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmNHB-00063J-EW for qemu-devel@nongnu.org; Wed, 23 Jan 2019 13:29:28 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:51800) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmNH9-0005zG-Gj for qemu-devel@nongnu.org; Wed, 23 Jan 2019 13:29:23 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x0NINnc6136130; Wed, 23 Jan 2019 18:29:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2018-07-02; bh=wE2FGmuH9C3/T9hZL8XE14TG4JMi0PQCIFrORgBiKeY=; b=VEvkmNRSFoeVd5Qz7uEyv/ritHPtSih4Pii05SB+uzErXzGXc0BudTRA2L0jJc2sYuVc O4f429ZzwdIGOR2bhuuRyIGcm8EmDj8praP8h+it8uoizqBozK7jgjO2w5VXCAE8JBMU ujbYTpo0YfhsaZq+J0jTAv+N7gYcC8M7Kn/f3Fk3Vbdlq8tODOpZ79eAksThqwOX65xw 5/EwrX2VrgiELw7WG/J8czeydSCTd87wThFoPpxan6wzLhOr8Femp1reLGmQsvmPZwhN 2YDu6BV1V96h7KsaJCxcdqErigdCqirTs0q8ag7PrcUsUSm7bRg5ApL9u9BdZr/vzKfN Mg== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2q3uauunjq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 23 Jan 2019 18:29:16 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x0NITEdM022415 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 23 Jan 2019 18:29:15 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x0NITEYw017489; Wed, 23 Jan 2019 18:29:14 GMT Received: from abi.no.oracle.com (/10.172.144.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 23 Jan 2019 10:29:13 -0800 From: Knut Omang To: qemu-devel@nongnu.org Date: Wed, 23 Jan 2019 19:27:58 +0100 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9145 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=449 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901230135 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.86 Subject: [Qemu-devel] [PATCH 0/2] pcie: Add simple ACS "support" to the generic PCIe root port X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S . Tsirkin" , Stefan Hajnoczi , Elijah Shakkour , Knut Omang , Alex Williamson , Tal Attaly Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP These two patches together implements a PCIe capability config space header for Access Control Services (ACS) for the new Qemu specific generic root port. ACS support in the associated root port is a prerequisite to be able to pass the a function of the device populating the port through to an L2 guest from an unmodified kernel. Without this, the IOMMU group the device belongs to will also include the root port itself, and all functions the device provides. With an SR/IOV device this becomes even more important, as the whole purpose with SR/IOV is to be able to share out individual VFs to different guests, which will not be permitted by VFIO or the Windows Hyper-V equivalent unless ACS is supported by the root port. These patches can also be found as part of an updated version of my SR/IOV emulation patch set at https://github.com/knuto/qemu/tree/sriov_patches_v9 Knut Omang (2): pcie: Add a simple PCIe ACS (Access Control Services) helper function gen_pcie_root_port: Add ACS (Access Control Services) capability hw/pci-bridge/gen_pcie_root_port.c | 2 ++ hw/pci-bridge/ioh3420.c | 1 - hw/pci-bridge/pcie_root_port.c | 3 +++ hw/pci/pcie.c | 14 ++++++++++++++ include/hw/pci/pcie.h | 1 + include/hw/pci/pcie_port.h | 1 + include/hw/pci/pcie_regs.h | 4 ++++ 7 files changed, 25 insertions(+), 1 deletion(-) base-commit: a8d2b0685681e2f291faaa501efbbd76875f8ec8