From nobody Fri Oct 3 18:01:16 2025 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85A04239E62; Thu, 28 Aug 2025 01:06:22 +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=1756343183; cv=none; b=qPSRKSMtfPy8SsEYK0zrpY/SvarEYzIdB9MSbwvZqk64iJJO0G+2dUkesl+sXqGgT8qEfAVVBniGLpbWs65dSZ7Wxh0X0p9i2nycXrrZ0oTJslvZJqNdccT1P5xMtSOTMKIThW68W5prljqmcpTcHnaU7sSXEOk5qrtRNnMauCs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756343183; c=relaxed/simple; bh=46Y8+Z9DAZXF8tsjHqjZ55u82hL+db3LMfdEPD/S0gA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kMvGuZZt30yEOuLO8IqtlEYTEmkCf+M7hzatBDMdT3lXPQpiqqRfp0tFV5MDpywgH6OyQAGqrm7LL4YSUH7vybYhUDZkjZ49vFqPKJNRi+S+PvCCEfHPpwJLx2DmqPyNBt42CYJWwInLWVWPI8B3p2Ll8opOiDJoPJGhGNWx+1k= 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=IJUuXiBx; 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="IJUuXiBx" Received: from romank-3650.corp.microsoft.com (unknown [131.107.174.60]) by linux.microsoft.com (Postfix) with ESMTPSA id AC0BD2110806; Wed, 27 Aug 2025 18:06:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AC0BD2110806 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1756343180; bh=gYn+PkrAu+o7Mabw/F4qZJoO3vn+QyToRNOGbqHj5uM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IJUuXiBx0Gq3bpOQF6Z52R/JDSBmpchO4rAZPfTZB3tEHaIx7NRkDaGXZGUTNSz+3 UdHufj8CdBTaco/UXfAvtn38u6YizQH8yQJaoCHUS137PpjLQQHHX5s5KcYrAVUiGa 2VVdQoimVolu4yYwTQDbikjS8hZo/S9X784dUaHI= From: Roman Kisel To: arnd@arndb.de, bp@alien8.de, corbet@lwn.net, dave.hansen@linux.intel.com, decui@microsoft.com, haiyangz@microsoft.com, hpa@zytor.com, kys@microsoft.com, mikelley@microsoft.com, mingo@redhat.com, tglx@linutronix.de, Tianyu.Lan@microsoft.com, wei.liu@kernel.org, x86@kernel.org, linux-hyperv@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: benhill@microsoft.com, bperkins@microsoft.com, sunilmut@microsoft.com, romank@linux.microsoft.com Subject: [PATCH hyperv-next v5 10/16] Drivers: hv: Rename the SynIC enable and disable routines Date: Wed, 27 Aug 2025 18:05:51 -0700 Message-ID: <20250828010557.123869-11-romank@linux.microsoft.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250828010557.123869-1-romank@linux.microsoft.com> References: <20250828010557.123869-1-romank@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The confidential VMBus requires support for the both hypervisor facing SynIC and the paravisor one. Rename the functions that enable and disable SynIC with the hypervisor. No functional changes. Signed-off-by: Roman Kisel Reviewed-by: Tianyu Lan Reviewed-by: Michael Kelley --- drivers/hv/channel_mgmt.c | 2 +- drivers/hv/hv.c | 11 ++++++----- drivers/hv/hyperv_vmbus.h | 4 ++-- drivers/hv/vmbus_drv.c | 6 +++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 1a33c6944b3c..6d66cbc9030b 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -846,7 +846,7 @@ static void vmbus_wait_for_unload(void) /* * In a CoCo VM the hyp_synic_message_page is not allocated * in hv_synic_alloc(). Instead it is set/cleared in - * hv_synic_enable_regs() and hv_synic_disable_regs() + * hv_hyp_synic_enable_regs() and hv_hyp_synic_disable_regs() * such that it is set only when the CPU is online. If * not all present CPUs are online, the message page * might be NULL, so skip such CPUs. diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 7c5f35806e77..efe161d95b25 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -271,9 +271,10 @@ void hv_synic_free(void) } =20 /* - * hv_synic_enable_regs - Initialize the Synthetic Interrupt Controller. + * hv_hyp_synic_enable_regs - Initialize the Synthetic Interrupt Controller + * with the hypervisor. */ -void hv_synic_enable_regs(unsigned int cpu) +void hv_hyp_synic_enable_regs(unsigned int cpu) { struct hv_per_cpu_context *hv_cpu =3D per_cpu_ptr(hv_context.cpu_context, cpu); @@ -339,14 +340,14 @@ void hv_synic_enable_regs(unsigned int cpu) =20 int hv_synic_init(unsigned int cpu) { - hv_synic_enable_regs(cpu); + hv_hyp_synic_enable_regs(cpu); =20 hv_stimer_legacy_init(cpu, VMBUS_MESSAGE_SINT); =20 return 0; } =20 -void hv_synic_disable_regs(unsigned int cpu) +void hv_hyp_synic_disable_regs(unsigned int cpu) { struct hv_per_cpu_context *hv_cpu =3D per_cpu_ptr(hv_context.cpu_context, cpu); @@ -533,7 +534,7 @@ int hv_synic_cleanup(unsigned int cpu) always_cleanup: hv_stimer_legacy_cleanup(cpu); =20 - hv_synic_disable_regs(cpu); + hv_hyp_synic_disable_regs(cpu); =20 return ret; } diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 095a5c758e93..545aedf2d03c 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -191,10 +191,10 @@ extern int hv_synic_alloc(void); =20 extern void hv_synic_free(void); =20 -extern void hv_synic_enable_regs(unsigned int cpu); +extern void hv_hyp_synic_enable_regs(unsigned int cpu); extern int hv_synic_init(unsigned int cpu); =20 -extern void hv_synic_disable_regs(unsigned int cpu); +extern void hv_hyp_synic_disable_regs(unsigned int cpu); extern int hv_synic_cleanup(unsigned int cpu); =20 /* Interface */ diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 5a5d7e696f31..aa0cde8b8a71 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -2812,7 +2812,7 @@ static void hv_crash_handler(struct pt_regs *regs) */ cpu =3D smp_processor_id(); hv_stimer_cleanup(cpu); - hv_synic_disable_regs(cpu); + hv_hyp_synic_disable_regs(cpu); }; =20 static int hv_synic_suspend(void) @@ -2837,14 +2837,14 @@ static int hv_synic_suspend(void) * interrupts-disabled context. */ =20 - hv_synic_disable_regs(0); + hv_hyp_synic_disable_regs(0); =20 return 0; } =20 static void hv_synic_resume(void) { - hv_synic_enable_regs(0); + hv_hyp_synic_enable_regs(0); =20 /* * Note: we don't need to call hv_stimer_init(0), because the timer --=20 2.43.0