From: "tip-bot2 for Marc Zyngier" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Marc Zyngier <maz@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Nianyao Tang <tangnianyao@huawei.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/core] irqchip/gic-v4: Make sure a VPE is locked when VMAPP is issued
Date: Mon, 15 Jul 2024 13:20:38 -0000 [thread overview]
Message-ID: <172104963892.2215.4356155837871772907.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240705093155.871070-4-maz@kernel.org>
The following commit has been merged into the irq/core branch of tip:
Commit-ID: a84a07fa3100d7ad46a3d6882af25a3df9c9e7e3
Gitweb: https://git.kernel.org/tip/a84a07fa3100d7ad46a3d6882af25a3df9c9e7e3
Author: Marc Zyngier <maz@kernel.org>
AuthorDate: Fri, 05 Jul 2024 10:31:55 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 15 Jul 2024 15:13:55 +02:00
irqchip/gic-v4: Make sure a VPE is locked when VMAPP is issued
In order to make sure that vpe->col_idx is correctly sampled when a VMAPP
command is issued, the vpe_lock must be held for the VPE. This is now
possible since the introduction of the per-VM vmapp_lock, which can be
taken before vpe_lock in the correct locking order.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nianyao Tang <tangnianyao@huawei.com>
Link: https://lore.kernel.org/r/20240705093155.871070-4-maz@kernel.org
---
drivers/irqchip/irq-gic-v3-its.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 215c7ab..c23a64f 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1810,7 +1810,9 @@ static void its_map_vm(struct its_node *its, struct its_vm *vm)
for (i = 0; i < vm->nr_vpes; i++) {
struct its_vpe *vpe = vm->vpes[i];
- its_send_vmapp(its, vpe, true);
+ scoped_guard(raw_spinlock, &vpe->vpe_lock)
+ its_send_vmapp(its, vpe, true);
+
its_send_vinvall(its, vpe);
}
}
@@ -1827,8 +1829,10 @@ static void its_unmap_vm(struct its_node *its, struct its_vm *vm)
if (!--vm->vlpi_count[its->list_nr]) {
int i;
- for (i = 0; i < vm->nr_vpes; i++)
+ for (i = 0; i < vm->nr_vpes; i++) {
+ guard(raw_spinlock)(&vm->vpes[i]->vpe_lock);
its_send_vmapp(its, vm->vpes[i], false);
+ }
}
}
next prev parent reply other threads:[~2024-07-15 13:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 9:31 [PATCH 0/3] irqchip/gic-v4: Fix VMAPP/VMOVP races Marc Zyngier
2024-07-05 9:31 ` [PATCH 1/3] irqchip/gic-v4: Always configure affinity on VPE activation Marc Zyngier
2024-07-10 16:42 ` [tip: irq/core] " tip-bot2 for Marc Zyngier
2024-07-15 13:20 ` tip-bot2 for Marc Zyngier
2024-07-05 9:31 ` [PATCH 2/3] irqchip/gic-v4: Substitute vmovp_lock for a per-VM lock Marc Zyngier
2024-07-10 16:42 ` [tip: irq/core] " tip-bot2 for Marc Zyngier
2024-07-15 13:20 ` tip-bot2 for Marc Zyngier
2024-07-05 9:31 ` [PATCH 3/3] irqchip/gic-v4: Make sure a VPE is locked when VMAPP is issued Marc Zyngier
2024-07-10 16:42 ` [tip: irq/core] " tip-bot2 for Marc Zyngier
2024-07-15 13:20 ` tip-bot2 for Marc Zyngier [this message]
2024-07-19 9:42 ` [PATCH 3/3] " Zhou Wang
2024-07-19 11:31 ` Marc Zyngier
2024-07-23 1:51 ` Zhou Wang
2024-07-23 17:56 ` Marc Zyngier
2024-07-24 1:13 ` Zhou Wang
2024-07-08 2:02 ` [PATCH 0/3] irqchip/gic-v4: Fix VMAPP/VMOVP races Tangnianyao
2024-07-17 8:41 ` Tangnianyao
2024-07-17 9:21 ` Marc Zyngier
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=172104963892.2215.4356155837871772907.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tangnianyao@huawei.com \
--cc=tglx@linutronix.de \
--cc=x86@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®