From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A25B618C91F; Wed, 23 Jul 2025 06:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753251503; cv=none; b=O0uvXhLSXe8G02x6Imf8Kq6/rTAVfmf+9+1B9V7wA2coo5I3cfnZNmh82XIZYF8B2vzwqBrYwEVj1JApGS0fY2eE/L6/ed3I54JsshspmRh5ZjpqMqjbojHSn2v7SbFs3WjIyJT24Nh2TOrKCaajYQkdgs8JMWzG1PWH3iCKLJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753251503; c=relaxed/simple; bh=rqrM0LKO3Whud6YGkhw6uiewxJ3mRCF6N+fqxS7NLeY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ybxmzh/1eDdt/mv4jb+Jpsd1S35cn7bO8bDJKe6insfsDolaVh7U0cS+MAzqD5kUmiRfk9C29TeEAxI7HBa7euQHQys3JPZt6hCuIBTiJr4TA3dKBZ6xlRTYWZb0pwTI0Y8zHiRMma3a+H4L2Nf/8LvXTFDC+8oGeBGbPy9rpwQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gXeHXmHR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gXeHXmHR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEDC0C4CEE7; Wed, 23 Jul 2025 06:18:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753251503; bh=rqrM0LKO3Whud6YGkhw6uiewxJ3mRCF6N+fqxS7NLeY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=gXeHXmHRncObLrt5e2njqEHHRsAANFxsyooWQ1cBdnJmVGG4UnAJIeYxP2jMxkjMu idpNqLypXd0/5YBkau7B9SDXAtbsGIRs64poWz1nPXqDCAHu1nYY2oLzwMHxku556U nr3sqCdVf/Y9yIb+K25qRvAhmd7f1aVy7jXW9zXPgB9lAW5w9mYA5M2XOMA2t8B5Ow yEvSJwqfgy4L9XaaqxIr7eOU56rvJlSdIan9viYKFSkJ9bOt/LjmVpj7GvFwZDLgnC ns2neJFZ0aNByHl3bB6APbkUUW2bj6mclPa44DQPIrv6yhKoctxYkVvgseU7trYo4d wSbD74A5GJ7vA== Message-ID: <6d3b5d1e-de1b-4d3b-ba14-7029c51b8e05@kernel.org> Date: Wed, 23 Jul 2025 08:18:17 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/2] dt-bindings: microsoft: Add vmbus message-connection-id property To: Hardik Garg Cc: apais@microsoft.com, conor+dt@kernel.org, decui@microsoft.com, devicetree@vger.kernel.org, haiyangz@microsoft.com, hargar@microsoft.com, krzk+dt@kernel.org, kys@microsoft.com, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, robh@kernel.org, ssengar@linux.microsoft.com, wei.liu@kernel.org, cho@microsoft.com References: <095a1455-c6ac-4a7d-a219-ddfd0a93d8d6@kernel.org> <1753240089-29558-1-git-send-email-hargar@linux.microsoft.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN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6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5 RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2 H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2 zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A= In-Reply-To: <1753240089-29558-1-git-send-email-hargar@linux.microsoft.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 23/07/2025 05:08, Hardik Garg wrote: >> Host is supposed to have multiple guests, so this feels like you are >> going to prepare for each guest different DTS with different connection >> ID. This feels like poor design. DTS is supposed to be relatively static >> configuration, not runtime choice vmguestid+1. > >> The guest cannot access other configuration channels, can it? If it can, >> it would mean it can eavesdrop on other guests? So obviously it cannot. >> Therefore from guest point of view this is completely redundant. Guest >> cannot use any other value, thus guest should not configure it. The >> guest has only one channel and uses only this one which gets to right >> place to the host. > > Thank you for your feedback. Let me explain the connection ID in more detail: > > 1. Message Port Architecture: > - The connection ID specifies which Hyper-V hypervisor message port (mailbox slot) to use for communication between the host and guest > - The hypervisor has multiple message ports, but historically VMBus only used one > - With the introduction of VTL2 (Virtual Trust Level 2), the control plane can now be hosted in VTL2, requiring different message ports for communication > > 2. Control Plane Communication: > - The VMBus control plane on the host needs to communicate with the VMBus driver in the guest > - When the control plane is hosted in VTL2, it requires a different message port than the standard communication path > - The connection ID tells the guest whether to use the standard or alternate message port for this control plane communication > > 3. Message Processing: > - Each message is tagged with an ID > - If the guest uses an incorrect ID, the host won't recognize the message and will drop it > - This is not about choosing between multiple available channels - it's about using the correct mailbox slot for communication > Don't paste me specs in response to questions, but answer specific questions. > 4. Security and Isolation: > - Each guest has its private hypervisor mailbox > - Multiple guests using the same connection ID cannot interfere with each other Then all guests can use the same value, 0, making this property redundant. > - The connection ID is more like a "root ID" that helps enumerate devices on the bus, not a channel selector between guests > > 5. Dynamic Nature: > - The connection ID is specified when the guest starts running > - The host can change it during VM lifecycle events (reset/reboot) So not suitable for DT. DT is a static data. You cannot just keep changing existing DT to match whatever you want runtime. > - This is why the VMBus driver needs to know the connection ID every time the kernel starts > - The ID might be different from what it was during the last guest run Best regards, Krzysztof