From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-of-o54.zoho.com (sender4-of-o54.zoho.com [136.143.188.54]) (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 A19703C73F0; Thu, 2 Apr 2026 16:14:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.54 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775146453; cv=pass; b=Im+bkxPVoL2l4oLxVN/S6Ix4yL2drgqg8RhdHAiIhcEg4qpjwbd3ZsN0wupymOiisiO41NIE240KUA/kY/5Hnz0LV3Zjwa80XhH2Rp1uZRNztm2upxnlJ1SPIRNEAKh2ocw3K012cwJzSfYDOIn73mvg9eXpzYYCmxVOFm2dNhU= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775146453; c=relaxed/simple; bh=+LVIE+ybFa4zLGsO/0YkrbfRPBZrc2UUJ7Pf4VFm2No=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BHIJWNCOpgyKCgWUrLh33cazldx8bbj153eIJkyQJ9hfg4DNVnuZf0hDTJRM2me0G2U6gzSShD7CXWPX8e+pknq4J60X02sR5ydgfblItL14RAD/DuoGaruvJLM066tqi7MDV0nb1j9s0zJlgjkrHf/hR45RwOmnfnIy5RVNWW0= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=anirudhrb.com; spf=pass smtp.mailfrom=anirudhrb.com; dkim=pass (1024-bit key) header.d=anirudhrb.com header.i=anirudh@anirudhrb.com header.b=toc3ZszR; arc=pass smtp.client-ip=136.143.188.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=anirudhrb.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=anirudhrb.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=anirudhrb.com header.i=anirudh@anirudhrb.com header.b="toc3ZszR" ARC-Seal: i=1; a=rsa-sha256; t=1775146426; cv=none; d=zohomail.com; s=zohoarc; b=UqfRFU9psVLHzUd1zOo3+vOE8ajkKxJnyUJ85aQmhMEX2Q2sMhT5kEuVRvoiq8HWloXvYNZ7xec4+8Ck7YGG9jYhIYO5JdokK9Gg9CpeBYFC7AAgDNcTwr+BEN4/KcisHNeqUwGxHiXFRYjSlNBmANS6+0McEUq60DOzI4T5DRU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775146426; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=7bzxN2aa3DTPFleAq7UC5FJozWAXzQ1MujGvjN45imE=; b=ZxiNAAjgmyBIBPBjVsd11oEuB3AHQlMZixQC7MrShIc5FmuLIUVolhYyePApktRQsyuKLgD2XurpgSje8ikK+IKy93ZE6K82fZQcWrVuVD9trYH4gcTVhvondoKrq0xGEHMvxH1OTCPptblOX0ygZlzEMyi7lT+JQ1/7D+Wkvr0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=anirudhrb.com; spf=pass smtp.mailfrom=anirudh@anirudhrb.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1775146426; s=zoho; d=anirudhrb.com; i=anirudh@anirudhrb.com; h=Date:Date:From:From:To:To:Cc:Cc:Subject:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To:Message-Id:Reply-To; bh=7bzxN2aa3DTPFleAq7UC5FJozWAXzQ1MujGvjN45imE=; b=toc3ZszRhcmpIhqo79E7iCi6a4pkHWO0o1NbYI6pEHeesUs5kcTWSHT0MZ9GJSGE KwQOhteCuGicLOTwIF2Ck8ahAjxbAuNHwGfCgs2rCR6k9sTim6jAmxQjBrMOy6NjqX3 4NHghhPRPwCPhZtmz58rjthEiWhCEk9HxxRgvxzo= Received: by mx.zohomail.com with SMTPS id 1775146422963135.15479658133734; Thu, 2 Apr 2026 09:13:42 -0700 (PDT) Date: Thu, 2 Apr 2026 16:13:35 +0000 From: Anirudh Rayabharam To: Jork Loeser Cc: linux-hyperv@vger.kernel.org, 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 , Roman Kisel , Michael Kelley , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 4/6] mshv: limit SynIC management to MSHV-owned resources Message-ID: <20260402-sturdy-chirpy-cat-78baeb@anirudhrb> References: <20260327201920.2100427-1-jloeser@linux.microsoft.com> <20260327201920.2100427-5-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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260327201920.2100427-5-jloeser@linux.microsoft.com> X-ZohoMailClient: External On Fri, Mar 27, 2026 at 01:19:15PM -0700, Jork Loeser wrote: > The SynIC is shared between VMBus and MSHV. VMBus owns the message > page (SIMP), event flags page (SIEFP), global enable (SCONTROL), and > SINT2. MSHV adds SINT0, SINT5, and the event ring page (SIRBP). > > Currently mshv_synic_init() redundantly enables SIMP, SIEFP, and > SCONTROL that VMBus already configured, and mshv_synic_cleanup() > disables all of them. This is wrong because MSHV can be torn down > while VMBus is still active. In particular, a kexec reboot notifier > tears down MSHV first. Disabling SCONTROL, SIMP, and SIEFP out from > under VMBus causes its later cleanup to write SynIC MSRs while SynIC > is disabled, which the hypervisor does not tolerate. > > Restrict MSHV to managing only the resources it owns: > - SINT0, SINT5: mask on cleanup, unmask on init > - SIRBP: enable/disable as before > - SIMP, SIEFP, SCONTROL: on L1VH leave entirely to VMBus (it > already enabled them); on root partition VMBus doesn't run, so > MSHV must enable/disable them Maybe it's time to extract all the synic management stuff to a separate file to act like synic "driver" which facilitates synic access to mutiple users i.e. mshv & vmbus. Thanks, Anirudh.