All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hardik Garg <hargar@linux.microsoft.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: apais@microsoft.com, cho@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
Subject: Re: [PATCH v4 1/2] dt-bindings: microsoft: Add vmbus message-connection-id property
Date: Thu, 6 Nov 2025 13:36:50 -0800	[thread overview]
Message-ID: <0bda852b-baaa-4167-ad9d-12931e213e29@linux.microsoft.com> (raw)
In-Reply-To: <69ed5b38-830d-46d7-a84b-86787c39df7d@kernel.org>


On 11/4/2025 10:55 PM, Krzysztof Kozlowski wrote:
> On 05/11/2025 02:10, Hardik Garg wrote:
>> Each guest has a private hypervisor mailbox and cannot access any other
>> guest’s communication path. Using an incorrect connection ID does not
>> allow eavesdropping or cause interference — it only results in failed
>> VMBus initialization because the host drops messages sent to an
>> unexpected port. Thus, exposing the correct connection ID to the guest
>> is safe and necessary for correct initialization.
>>
>>> If different values are important for the host, then all guests should
>>> use whatever 0 which will map to different values on host by other means
>>> of your protocol.
>>>
>> Using a fixed value such as 0 for all guests would not work, because the
>> Hyper-V host differentiates between multiple control-plane contexts (for
>> example, VTL0 vs VTL2) using distinct connection IDs. The guest must use
>> the value assigned by the host, as there is no implicit mapping or
>> negotiation protocol to determine it otherwise.
> Sorry, I am not going back to three months old discussion.

I understand your point and I apologize again for the delay in getting
back to you. It took me some time to explore alternative approaches and
verify whether the connection ID could be handled differently, but I’m
now done with that investigation. I’ll make sure to respond in a timely
manner going forward.

>
> Therefore I close this topic for me with: since the actual value does
> not matter for the host - it will discard all messages which are not
> intended to this guest - you can just use value 0 and your hypervisor
> will map to proper port.

The connection ID is managed entirely by the hypervisor and varies
depending on the VM’s configuration (for example, whether the control
plane is in VTL0 or VTL2). There is no existing mapping logic on the
guest side that could translate a constant value like 0 into the correct
port assignment. The host assigns distinct IDs for each configuration,
and the guest must use that specific value to establish the VMBus
control channel correctly.

Could you please confirm if I’m misunderstanding your suggestion about
the mapping mechanism? Without receiving the correct ID from the
hypervisor (via DT or another interface), the guest cannot infer the
right port on its own.

Also, since this thread is quite old, would you prefer that I start a new
thread when I resend the updated patch?

Thanks again for your feedback and patience.




Thanks,
Hardik


  reply	other threads:[~2025-11-06 21:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19 23:06 [PATCH v4 0/2] vmbus: Add DeviceTree support for message connection-id Hardik Garg
2025-06-19 23:06 ` [PATCH v4 1/2] dt-bindings: microsoft: Add vmbus message-connection-id property Hardik Garg
2025-06-20  7:21   ` Krzysztof Kozlowski
2025-07-14  7:48     ` Hardik Garg
2025-07-14  7:56       ` Krzysztof Kozlowski
2025-07-16  4:42         ` Hardik Garg
2025-07-16 14:35           ` Krzysztof Kozlowski
2025-07-23  3:08             ` Hardik Garg
2025-07-23  6:18               ` Krzysztof Kozlowski
2025-07-24 22:12                 ` Hardik Garg
2025-07-25  7:32                   ` Krzysztof Kozlowski
2025-11-05  1:10                     ` Hardik Garg
2025-11-05  6:55                       ` Krzysztof Kozlowski
2025-11-06 21:36                         ` Hardik Garg [this message]
2025-06-19 23:06 ` [PATCH v4 2/2] vmbus: retrieve connection-id from DeviceTree Hardik Garg
2025-06-20  2:36   ` Michael Kelley
2025-06-20  7:22   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0bda852b-baaa-4167-ad9d-12931e213e29@linux.microsoft.com \
    --to=hargar@linux.microsoft.com \
    --cc=apais@microsoft.com \
    --cc=cho@microsoft.com \
    --cc=conor+dt@kernel.org \
    --cc=decui@microsoft.com \
    --cc=devicetree@vger.kernel.org \
    --cc=haiyangz@microsoft.com \
    --cc=hargar@microsoft.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=ssengar@linux.microsoft.com \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.