Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2586924rdb; Wed, 21 Feb 2024 12:22:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU+fv+OdUko02CcMPI+8InN21UgPUUTwCdmClZ81oyYqPYaM0i/1ZFvk/vqkzlTxcmKNFHitpTRmT48mn23+kxKcweUVhootC6YQDp/ow== X-Google-Smtp-Source: AGHT+IEhgy1R2wUjZNpuJY9gRNfvOJv20UaHaBhTfXJUZATQCHHmCWmKfu90CDf9aGZ1ZZzVeOia X-Received: by 2002:a37:de0f:0:b0:787:6b6c:864f with SMTP id h15-20020a37de0f000000b007876b6c864fmr8724250qkj.62.1708546927964; Wed, 21 Feb 2024 12:22:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708546927; cv=pass; d=google.com; s=arc-20160816; b=OkLbqY/+K0Ny+9654XdI43PkdhPcYXO9dfKY2J0/1R3BRBkAtfNGJ6eGd1EF+IZ21x mnRZ3PaowsfZQm7o9shUNsajj3ZSTs373Ds/Ny1u5GYy2B2FtW/TGkkOeiJe/pH7MV8i VsQCRGqrxJi0TpYDyHQygM3EI4YH6yo7dWo0kqRb+L7KOFjONR8GVDc6IfDEDZfDZ7Ia luXSIhDEcC0y8K419+68k3iVOZXpet21fn6SjQEx5yz2H5ORi3NKQfDSq7ZR9cVLpWZ8 K1TJ82whaTOgzDnywiPpR3MBNJz5bIMAXKi9TuBsC3v7IY+RuHB9tBjXbnUFgTt5leMa kUiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=LYXevElDZUwwcuCssk+PoziO3z76J9Zi3RvRyDyoi1s=; fh=qaL5/1svrQ5mBxOmh/rBSEW+2CzhuTsbCBNRtzacYOg=; b=TP/rSMhvU+tKftInTYsVY7unnCvrRELqforCxRe46e2Cb9H2kWHQlauRv6O6jhKYn8 Vqd0f1Nf6ujdZRo0gYVR7x9qE8i9rnKHrN9wbVrSyWZ3vqU0akk+czpDWI4imA+b+trV t6GxVuj9iCLcHhGTbMHEKt6r4mvOpJ7SfdIuJZkMEYu36a6T6/+p/Ln/tHiR3W4iWPpu Pzh2Tn0ufe8hNYAXHSLU4nE+1UcfmvUE9FBHnQM5eSKZt+MEWuH5Qi3O8iGW8GB7D2Ou 84RZ5ALJT8Ck+aCo/TtFXXkZbEeP2nCagakHW1VX33Z6gY+QeNwbJlI08r1fhLS52DXD dmSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LbgD4kWu; dkim=neutral (no key) header.i=@linutronix.de; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-75455-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75455-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pj5-20020a05620a1d8500b007871f998409si11608761qkn.695.2024.02.21.12.22.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 12:22:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75455-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LbgD4kWu; dkim=neutral (no key) header.i=@linutronix.de; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-75455-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75455-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 B40441C22902 for ; Wed, 21 Feb 2024 20:22:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D36FC86641; Wed, 21 Feb 2024 20:22:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LbgD4kWu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="iDeVqb1X" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 CEDDA85958; Wed, 21 Feb 2024 20:21:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708546921; cv=none; b=JHlpKtOeKDcAopxhanRJfbU2lYuxtv58IBc899sqi2LC9Ft3eYAU4HAgzUPL8LAHmMfOj9rM/nLlQi8N2BKKEZDkX7CdMRabqmVcwLK53kahc3Dvy6bUEcu9W0c1hg4m222rHVIo9X7fZFWxoNLxb8ob4W2lkqBrzH5FUFp3L8M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708546921; c=relaxed/simple; bh=ImC36rMMHpLz4+5E+KQEQoxCcH+ZOWrg6nxm1kytxdU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=davt3baTd1T1N0byLQPsVXDAajVrjnxd3oKC7KD55yW7J3uyoyn/0/Vz/cn0ObNkYXec8RPaNPCXOOhchkFdBXOYZ2a2bu4mRaraUB3/Uh3/88a3toq4QlnSxeX9o/LvpXw/Wv+tXei7o+rtJLqzJgfFi81YQZe1h9Rz30Lgf9o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LbgD4kWu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=iDeVqb1X; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Wed, 21 Feb 2024 20:21:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708546916; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LYXevElDZUwwcuCssk+PoziO3z76J9Zi3RvRyDyoi1s=; b=LbgD4kWufpeq1TOYGRUKiQExZAnKWyLFII5hLKB2PjBeRis7FYENAIloe9k+vw2+QbB4SK gGTQWL+bYEBqGCZh7uV/TqtkzSq9qxZN2oVpEBmSN6EmNpmFBpaPSU/q/dFwri7CAVFMCE 7k6lfdLES/RIzA2kESPD5TWWZoDsgmEURn1V17jRFBbEAFg7uHmXS3blR+sauZLTUXI/D1 qdrVdeqa+5PKNLYgxDCnjRcwQhXonK9RXcftuoPSeV1GKoinD4khk31AmY+hkAhUGlulf+ yLhbjqw4J2CIhOrI+q/sfhQedtr8RF6E8YH8JPHL5HcDCJzXsbFEYqwAFuOLLg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708546916; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LYXevElDZUwwcuCssk+PoziO3z76J9Zi3RvRyDyoi1s=; b=iDeVqb1X9KcQD36OakGQakXKCEVOt0v4bcQ5UJE6B7e0pMKkkATdkpRAYENpEQ5iciA6t4 iu89mD3oIctU6KCw== From: "tip-bot2 for Oliver Upton" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/urgent] irqchip/gic-v3-its: Do not assume vPE tables are preallocated Cc: George Cherian , Marc Zyngier , Oliver Upton , Thomas Gleixner , stable@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240219185809.286724-2-oliver.upton@linux.dev> References: <20240219185809.286724-2-oliver.upton@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170854691584.398.7536977527591129636.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the irq/urgent branch of tip: Commit-ID: ec4308ecfc887128a468f03fb66b767559c57c23 Gitweb: https://git.kernel.org/tip/ec4308ecfc887128a468f03fb66b767559c57c23 Author: Oliver Upton AuthorDate: Mon, 19 Feb 2024 18:58:06 Committer: Thomas Gleixner CommitterDate: Wed, 21 Feb 2024 21:11:20 +01:00 irqchip/gic-v3-its: Do not assume vPE tables are preallocated The GIC/ITS code is designed to ensure to pick up any preallocated LPI tables on the redistributors, as enabling LPIs is a one-way switch. There is no such restriction for vLPIs, and for GICv4.1 it is expected to allocate a new vPE table at boot. This works as intended when initializing an ITS, however when setting up a redistributor in cpu_init_lpis() the early return for preallocated RD tables skips straight past the GICv4 setup. This all comes to a head when trying to kexec() into a new kernel, as the new kernel silently fails to set up GICv4, leading to a complete loss of SGIs and LPIs for KVM VMs. Slap a band-aid on the problem by ensuring its_cpu_init_lpis() always initializes GICv4 on the way out, even if the other RD tables were preallocated. Fixes: 6479450f72c1 ("irqchip/gic-v4: Fix occasional VLPI drop") Reported-by: George Cherian Co-developed-by: Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oliver Upton Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240219185809.286724-2-oliver.upton@linux.dev --- drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 53abd47..b822752 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -3181,6 +3181,7 @@ static void its_cpu_init_lpis(void) val |= GICR_CTLR_ENABLE_LPIS; writel_relaxed(val, rbase + GICR_CTLR); +out: if (gic_rdists->has_vlpis && !gic_rdists->has_rvpeid) { void __iomem *vlpi_base = gic_data_rdist_vlpi_base(); @@ -3216,7 +3217,6 @@ static void its_cpu_init_lpis(void) /* Make sure the GIC has seen the above */ dsb(sy); -out: gic_data_rdist()->flags |= RD_LOCAL_LPI_ENABLED; pr_info("GICv3: CPU%d: using %s LPI pending table @%pa\n", smp_processor_id(),