From: Maxim Levitsky <mlevitsk@redhat.com> To: linux-kernel@vger.kernel.org Cc: David Woodhouse <dwmw@amazon.co.uk>, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>, Joerg Roedel <joro@8bytes.org>, Thomas Gleixner <tglx@linutronix.de>, iommu@lists.linux-foundation.org (open list:AMD IOMMU (AMD-VI)), Will Deacon <will@kernel.org>, Maxim Levitsky <mlevitsk@redhat.com> Subject: [PATCH 2/5] iommu/amd: x2apic mode: re-enable after resume Date: Tue, 23 Nov 2021 18:10:35 +0200 [thread overview] Message-ID: <20211123161038.48009-3-mlevitsk@redhat.com> (raw) In-Reply-To: <20211123161038.48009-1-mlevitsk@redhat.com> Otherwise it is guaranteed to not work after the resume... Fixes: 66929812955bb ("iommu/amd: Add support for X2APIC IOMMU interrupts") Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> --- drivers/iommu/amd/init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 8dae85fcfc2eb..b905604f434e1 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -2172,7 +2172,6 @@ static int iommu_setup_intcapxt(struct amd_iommu *iommu) return ret; } - iommu_feature_enable(iommu, CONTROL_INTCAPXT_EN); return 0; } @@ -2195,6 +2194,10 @@ static int iommu_init_irq(struct amd_iommu *iommu) iommu->int_enabled = true; enable_faults: + + if (amd_iommu_xt_mode == IRQ_REMAP_X2APIC_MODE) + iommu_feature_enable(iommu, CONTROL_INTCAPXT_EN); + iommu_feature_enable(iommu, CONTROL_EVT_INT_EN); if (iommu->ppr_log != NULL) -- 2.26.3
WARNING: multiple messages have this Message-ID (diff)
From: Maxim Levitsky <mlevitsk@redhat.com> To: linux-kernel@vger.kernel.org Cc: Maxim Levitsky <mlevitsk@redhat.com>, "open list:AMD IOMMU AMD-VI" <iommu@lists.linux-foundation.org>, Thomas Gleixner <tglx@linutronix.de>, Will Deacon <will@kernel.org>, David Woodhouse <dwmw@amazon.co.uk> Subject: [PATCH 2/5] iommu/amd: x2apic mode: re-enable after resume Date: Tue, 23 Nov 2021 18:10:35 +0200 [thread overview] Message-ID: <20211123161038.48009-3-mlevitsk@redhat.com> (raw) In-Reply-To: <20211123161038.48009-1-mlevitsk@redhat.com> Otherwise it is guaranteed to not work after the resume... Fixes: 66929812955bb ("iommu/amd: Add support for X2APIC IOMMU interrupts") Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> --- drivers/iommu/amd/init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 8dae85fcfc2eb..b905604f434e1 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -2172,7 +2172,6 @@ static int iommu_setup_intcapxt(struct amd_iommu *iommu) return ret; } - iommu_feature_enable(iommu, CONTROL_INTCAPXT_EN); return 0; } @@ -2195,6 +2194,10 @@ static int iommu_init_irq(struct amd_iommu *iommu) iommu->int_enabled = true; enable_faults: + + if (amd_iommu_xt_mode == IRQ_REMAP_X2APIC_MODE) + iommu_feature_enable(iommu, CONTROL_INTCAPXT_EN); + iommu_feature_enable(iommu, CONTROL_EVT_INT_EN); if (iommu->ppr_log != NULL) -- 2.26.3 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2021-11-23 16:11 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-23 16:10 [PATCH 0/5] iommu/amd: fixes for suspend/resume Maxim Levitsky 2021-11-23 16:10 ` Maxim Levitsky 2021-11-23 16:10 ` [PATCH 1/5] iommu/amd: restore GA log/tail pointer on host resume Maxim Levitsky 2021-11-23 16:10 ` Maxim Levitsky 2021-11-23 16:10 ` Maxim Levitsky [this message] 2021-11-23 16:10 ` [PATCH 2/5] iommu/amd: x2apic mode: re-enable after resume Maxim Levitsky 2021-11-23 16:10 ` [PATCH 3/5] iommu/amd: x2apic mode: setup the INTX registers on mask/unmask Maxim Levitsky 2021-11-23 16:10 ` Maxim Levitsky 2021-11-23 16:10 ` [PATCH 4/5] iommu/amd: x2apic mode: mask/unmask interrupts on suspend/resume Maxim Levitsky 2021-11-23 16:10 ` Maxim Levitsky 2021-11-23 16:10 ` [PATCH 5/5] iommu/amd: remove useless irq affinity notifier Maxim Levitsky 2021-11-23 16:10 ` Maxim Levitsky 2021-12-01 23:08 ` [PATCH 0/5] iommu/amd: fixes for suspend/resume Maxim Levitsky 2021-12-01 23:08 ` Maxim Levitsky 2021-12-10 8:00 ` Maxim Levitsky 2021-12-10 8:00 ` Maxim Levitsky 2021-12-06 14:01 ` Joerg Roedel 2021-12-06 14:01 ` Joerg Roedel 2021-12-17 8:31 ` Joerg Roedel 2021-12-17 8:31 ` Joerg Roedel 2022-01-25 15:08 ` Mike Lothian 2022-01-25 15:08 ` Mike Lothian 2022-01-25 19:26 ` Maxim Levitsky 2022-01-25 19:26 ` Maxim Levitsky 2022-01-25 23:25 ` Mike Lothian 2022-01-25 23:25 ` Mike Lothian 2022-01-26 7:34 ` Maxim Levitsky 2022-01-26 7:34 ` Maxim Levitsky 2022-01-26 9:54 ` Mike Lothian 2022-01-26 9:54 ` Mike Lothian 2022-01-26 10:12 ` Maxim Levitsky 2022-01-26 10:12 ` Maxim Levitsky 2022-01-27 0:39 ` Mike Lothian 2022-01-27 0:39 ` Mike Lothian 2022-01-27 10:22 ` Maxim Levitsky 2022-01-27 10:22 ` Maxim Levitsky 2022-01-27 10:50 ` Mike Lothian 2022-01-27 10:50 ` Mike Lothian
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211123161038.48009-3-mlevitsk@redhat.com \ --to=mlevitsk@redhat.com \ --cc=dwmw@amazon.co.uk \ --cc=iommu@lists.linux-foundation.org \ --cc=joro@8bytes.org \ --cc=linux-kernel@vger.kernel.org \ --cc=suravee.suthikulpanit@amd.com \ --cc=tglx@linutronix.de \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.