From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6EC938A717; Mon, 27 Apr 2026 21:39:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777325947; cv=none; b=fGAyDNHuVcORdxUDJOa68MlA2OJT8NzbGwiMsBVMM237omhqC7zWFrlNGnv/YvKCO1vJuPkFtYmVO+v88bLngdfF4Nzzl+xV6IfamsLGRYmvCHA5dDU5728zw6WBjlcXeSj1sqUeb+P88r4Y+p20ogAAnvmBCr3I4JZPSR8R/q8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777325947; c=relaxed/simple; bh=Mt9XKRmVe/67nhmObCnNyk5v/+5rvNqVEgXwWee6Q9Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l4gS2z0KtkGABT4SS+Uus8dnLXuSm4sSniflRtlORXATXvtNGSeLQAg8Nz22HC2q5GL6Ro3bsvDG89pa1DhBEHkhHlDv0B2G+wFuQhTxq9oABUcrC6ph9xn7O8NRTiPodoqftQ71qGpB04y62C4WFHF+J6wkupltERiDZhZ0m8s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=YykBf/xs; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="YykBf/xs" Received: by linux.microsoft.com (Postfix, from userid 1241) id 2FF6820B716C; Mon, 27 Apr 2026 14:39:07 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2FF6820B716C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1777325947; bh=Yx64nvYTvY6la2T5WN/L3+C9DJts9dYoqLMPjR+w/9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YykBf/xs+2L7LiYQtM2VMoKQaauNSRLrW5xe5mxETfnK7btUSZsHQq+Yv4g8NKVaT ktbJ2dONBy9a4hLntlMwu3nrS4LZ5QYbRwVC4DqDmaS+7ybFRP+tSzpJprfcF0VOUe A50pWZuh5PNBUeacgWSQjKpCfcBkTovigkPghDWQ= From: Jork Loeser To: linux-hyperv@vger.kernel.org Cc: x86@kernel.org, "K . Y . Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Arnd Bergmann , Michael Kelley , Anirudh Rayabharam , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Jork Loeser Subject: [PATCH v4 2/3] mshv: clean up SynIC state on kexec for L1VH Date: Mon, 27 Apr 2026 14:38:53 -0700 Message-ID: <20260427213855.1675044-3-jloeser@linux.microsoft.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: <20260427213855.1675044-1-jloeser@linux.microsoft.com> References: <20260427213855.1675044-1-jloeser@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-hyperv@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The reboot notifier that tears down the SynIC cpuhp state guards the cleanup with hv_root_partition(), so on L1VH (where hv_root_partition() is false) SINT0, SINT5, and SIRBP are never cleaned up before kexec. The kexec'd kernel then inherits stale unmasked SINTs and an enabled SIRBP pointing to freed memory. Remove the hv_root_partition() guard so the cleanup runs for all parent partitions. Signed-off-by: Jork Loeser --- drivers/hv/mshv_synic.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/hv/mshv_synic.c b/drivers/hv/mshv_synic.c index 2db3b0192eac..978a1cace341 100644 --- a/drivers/hv/mshv_synic.c +++ b/drivers/hv/mshv_synic.c @@ -723,9 +723,6 @@ mshv_unregister_doorbell(u64 partition_id, int doorbell_portid) static int mshv_synic_reboot_notify(struct notifier_block *nb, unsigned long code, void *unused) { - if (!hv_root_partition()) - return 0; - cpuhp_remove_state(synic_cpuhp_online); return 0; } -- 2.43.0