From patchwork Mon Nov 21 14:38:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 23839 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1633857wrr; Mon, 21 Nov 2022 06:51:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf4T9jTYobs7uZbz85ygEKMMwi2pnC4Di4H2GCEjb1NCqso94VOvfyTCSUDVyeSNlTChLBOi X-Received: by 2002:a17:90a:17cb:b0:218:a9e2:196a with SMTP id q69-20020a17090a17cb00b00218a9e2196amr6913781pja.245.1669042316067; Mon, 21 Nov 2022 06:51:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669042316; cv=none; d=google.com; s=arc-20160816; b=B69COGAI5ezO3w4nDKa0vp0UvRD88Ujpnl3mB3i43RS/3gIUWL0g1jP853W2Rt4MLE YAKd7Y+o7BPRSmmWcAh/MI21fS2LzXkVec6IXv3yvUUu3uMxImRniUDAQs+lgyl6YE/Y KcoK69biEKUEX5I4CdcNNsnnMZJdUO7PPl5fwwBLsE08Yf4xdjD2N4hO+ydAbfoZjdYi SE+bw9o5d6KI/Yez5fGvyuIHTESu5o0cdyGpRGNRjzzXHcMbhYg/5ak3IRSZuMM0T257 0YOcWvdJPtpH7GrkrL8yhiKMKteSBSV8S/lDUFR2Ycmg+OVYIbYk82jSueRNOFHujf1M ZiCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=vuCfp3+0SFn3kyyf+6t5pZzLC+oocOyU3+0CroYzbSc=; b=u1sUfZaKntywtJnp2MXCbj2DLO0s43vuME2RhmsSibsV+mlr2K0ox+ImAvhYgOos7O kMgbOatN3JU8+sZlvwtYCXzseWYLS5N7v+wtLfDpPkYSpN4aJjMxs6kU5Fd6ubABwTQf dXR8aHHLP/KeJoeZaNYS0x5WkOJX0dWQ0g6HZ4kOsq690FLoKjIwCmawQyJxn/2oKmCv eyue2tvaH5MFh5N+XsrNlDYUi3vaiVVgncN1Sb+f/bvx9WkjsCzq8Nr+vywja5sWwUNW AV1LuZGaLG6pwlOkhMcbBzrxS8R3kzEybvXMgP5qrpHzeBUY0PPpR27+209NyBVxfOc9 8ugg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Yg+8EfB0; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=WX0QowPn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l17-20020a170903121100b00186f9d4400esi12343837plh.346.2022.11.21.06.51.40; Mon, 21 Nov 2022 06:51:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Yg+8EfB0; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=WX0QowPn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231944AbiKUOlf (ORCPT + 99 others); Mon, 21 Nov 2022 09:41:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231828AbiKUOj7 (ORCPT ); Mon, 21 Nov 2022 09:39:59 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B808AC80FB; Mon, 21 Nov 2022 06:38:27 -0800 (PST) Message-ID: <20221121091328.236473819@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669041506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=vuCfp3+0SFn3kyyf+6t5pZzLC+oocOyU3+0CroYzbSc=; b=Yg+8EfB0o47msNysn1k4RIEvMk4PKjJ/EtKbJJs1ESh4pVXoedf3RCnlxK7UoYNzCBH+ZZ sxSrNNFNCw6mp8+qeF6Agx990r1jaBUCb2yH8jkV+lmNji6UQejygwaeLxnRelW4NN6elQ 5weU8MGbOqb+MkQGiQPLt05u+IZB0rXS1tFsXgL3PXPU9vRWNvwpkD50aVZAjK1cKIAoYg W0mDC+bCQ8yo9bisVhksFlKTm2qP97tZMZpR9MEelx97xm/TbUgUQu3rQw0dTeRslFiDj0 yhWGNapN+pY5ollPgVE/YHISoAUPWAGdWLMPPldS31l45NEUpOdd/UbLoLpqKQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669041506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=vuCfp3+0SFn3kyyf+6t5pZzLC+oocOyU3+0CroYzbSc=; b=WX0QowPnzLAI27QygZUlE4lr7KZkT5x9fkHH4mm+WN52FVoVpdEy1qoQmRnaf2WZngn660 9yBjskh2q7f1QTDw== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Joerg Roedel , Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Marc Zyngier , Greg Kroah-Hartman , Jason Gunthorpe , Dave Jiang , Alex Williamson , Kevin Tian , Dan Williams , Logan Gunthorpe , Ashok Raj , Jon Mason , Allen Hubbe Subject: [patch V2 32/33] iommu/amd: Enable PCI/IMS References: <20221121083657.157152924@linutronix.de> MIME-Version: 1.0 Date: Mon, 21 Nov 2022 15:38:26 +0100 (CET) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750117715728945802?= X-GMAIL-MSGID: =?utf-8?q?1750117715728945802?= PCI/IMS works like PCI/MSI-X in the remapping. Just add the feature flag. Signed-off-by: Thomas Gleixner --- drivers/iommu/amd/iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -3649,7 +3649,9 @@ static struct irq_chip amd_ir_chip = { }; static const struct msi_parent_ops amdvi_msi_parent_ops = { - .supported_flags = X86_VECTOR_MSI_FLAGS_SUPPORTED | MSI_FLAG_MULTI_PCI_MSI, + .supported_flags = X86_VECTOR_MSI_FLAGS_SUPPORTED | + MSI_FLAG_MULTI_PCI_MSI | + MSI_FLAG_PCI_IMS, .prefix = "IR-", .init_dev_msi_info = msi_parent_init_dev_msi_info, };