Message ID | 20240213094012.3961447-1-oliver.upton@linux.dev |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-63240-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp428054dyb; Tue, 13 Feb 2024 01:46:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU7G+QWCmdPsT42//8qrinAXhFlidVJXcijXDREw0mMb9tPioQwJ0dL7/9M+r8S3Gl4bwpz24SEUY027HRY0j8Ad19wdw== X-Google-Smtp-Source: AGHT+IFHEf9MACYdJu7NcecVQWO8MiBmxg4+n16s1hgOb1ic3Uqo2Cio9USocnNLtLaQM1JKL9n1 X-Received: by 2002:a0c:e254:0:b0:68c:cb5b:25a0 with SMTP id x20-20020a0ce254000000b0068ccb5b25a0mr2756206qvl.26.1707817588045; Tue, 13 Feb 2024 01:46:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707817588; cv=pass; d=google.com; s=arc-20160816; b=SfoAydazsR2ojP7R3IddsD3YSNF4fMMk9xvrUeQVBYjO0SwJOvrf2CbN36MLIbMTAW Zv3UYihd4COeysbTcpxmd66xrEUmXbgr7AEXC1fmyvHj9wOMuoZyZ9/kOm4bJw80FWFY pDG+AQllkmrMTmtQyAcRiup7xQfkXTT7rddtgUCbIY/TVyt/NhW2A5npJs4YuWtm2L+4 zEA/NfvmIqfsKPWHPSsq+C8ePBEwJ12bzZQVREaZjakOVxGh/pK0ZLihUpGsEdlxx6GY KBoEQXdPvTB9g3PTcoCRojfSmAr3NWW7937Jmq/ci+pSh9ViCnHsjq/msjZmVRRe+8lh 7gAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=OvMkuTAmZ2Y4I5mIeurgoX7p1vggpBUJZeCNdIuhqjI=; fh=dLHm0KwAywrebbLhXAB9MrbXzDvW3d37esTQcgIg0bs=; b=QsEFKX64WiQRLtXaJ9ZINf6V/RvUnCloyJQPciyoihPXpfe7W2GNXhtEebsoAoIIH5 PK8tLCuNsTmcWJ8I0HygfQmoadN3JqAOmd0IXeKeIrTNv6kjZ557EtzWKkOf03ieoMIa 4P/roUzkrYV5i7sawKcL6NP9OVVH3tPSc8TSuecl2NyIDZoxyOTqVNxq9g//pFMezAMB KfoAbEvA9LyRy1ZHXDn3oHUriX8j0tMSEdwCZOpirMvQFmbNumnBvjMXdOUrI7h9w1to krszqVKANVGe4u7NYZTYgn3YtvMvZLYBSWd0k/HNL26b268O261JBw0WI636VQFyQvW5 WQHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="A9/0Pdap"; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-63240-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63240-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=2; AJvYcCWqwTpialHOPScgbX7tP4dsu7byNOOsKDjfrYkmUPSPysx288ra4mrEnW/eKhNwOWM5n9N+JM5KV18XMVln0SccDleTBg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id jf11-20020a0562142a4b00b00680b0f40fb4si2502581qvb.206.2024.02.13.01.46.27 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 01:46:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63240-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="A9/0Pdap"; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-63240-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63240-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2BE021C2630B for <ouuuleilei@gmail.com>; Tue, 13 Feb 2024 09:45:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B3C225564; Tue, 13 Feb 2024 09:40:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="A9/0Pdap" Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 591361E4A2 for <linux-kernel@vger.kernel.org>; Tue, 13 Feb 2024 09:40:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707817224; cv=none; b=eXC8o1sKJp3j1+h3EHAzFi5vihfgD27Yg/5e3sRH8ahjPmeicWtRKUvpT2YuNePOx7s9QjwM26iUZ4GIhFr1fkrhsbR1Ym7/26qEM4i9VueezdPYOV3HCaKLRaq25gMkMsMegrD8ZWM16W6EWIdsH2ttmogYr9OATSfwVBHBBfo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707817224; c=relaxed/simple; bh=Hw7vNI2Kb24vC0nkaK7/5I/kAuFRQ3NHTOq4CoOcbhQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SRcsZD2IKNWwjzUeFb6So1dU5+RjAEsoqBvuz2Rzm12bITGpajaqHA7tlgMsNsb/ooBy+R2CaVkS/XhpJyGiHZ9vOqH9Tf6jEdTZI9HBmGiuACD60jQqf1djZ38IUA1RiUgO8nQGU7q/8/+zJlO+JgvEZQEHl1XIfqv6hrc9FFc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=A9/0Pdap; arc=none smtp.client-ip=91.218.175.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1707817221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OvMkuTAmZ2Y4I5mIeurgoX7p1vggpBUJZeCNdIuhqjI=; b=A9/0Pdapfde4UMXWBuOSYEnsYs3XzXeTFT8/HtvInZYMXQGfoyHtP9GTyIEbV2KV6N5ZJf 1GzoPWM9GzgXptD4kKnxk5qSHY2zanY52NPwmDaJzKgsZSISUa26dRM3mo7RTWUFOcRMKa pXPEbI09FCmKKPQNM2lUj+U/uXTIovE= From: Oliver Upton <oliver.upton@linux.dev> To: kvmarm@lists.linux.dev Cc: kvm@vger.kernel.org, Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Zenghui Yu <yuzenghui@huawei.com>, linux-kernel@vger.kernel.org, Oliver Upton <oliver.upton@linux.dev> Subject: [PATCH v2 16/23] KVM: arm64: vgic-its: Rely on RCU to protect translation cache reads Date: Tue, 13 Feb 2024 09:40:12 +0000 Message-ID: <20240213094012.3961447-1-oliver.upton@linux.dev> In-Reply-To: <20240213093250.3960069-1-oliver.upton@linux.dev> References: <20240213093250.3960069-1-oliver.upton@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790776535015395701 X-GMAIL-MSGID: 1790776535015395701 |
Series |
KVM: arm64: Improvements to LPI injection
|
|
Commit Message
Oliver Upton
Feb. 13, 2024, 9:40 a.m. UTC
Stop taking the lpi_list_lock when reading the LPI translation cache.
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
---
arch/arm64/kvm/vgic/vgic-its.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c index 55463eb84763..0e449f8c1f01 100644 --- a/arch/arm64/kvm/vgic/vgic-its.c +++ b/arch/arm64/kvm/vgic/vgic-its.c @@ -593,15 +593,14 @@ static struct vgic_irq *vgic_its_check_cache(struct kvm *kvm, phys_addr_t db, { struct vgic_dist *dist = &kvm->arch.vgic; struct vgic_irq *irq; - unsigned long flags; - raw_spin_lock_irqsave(&dist->lpi_list_lock, flags); + rcu_read_lock(); irq = __vgic_its_check_cache(dist, db, devid, eventid); if (!vgic_try_get_irq_kref(irq)) irq = NULL; - raw_spin_unlock_irqrestore(&dist->lpi_list_lock, flags); + rcu_read_unlock(); return irq; }