Skip to content

Commit f77276d

Browse files
mhklinuxliuw
authored andcommitted
Documentation: hyperv: Update VMBus doc with new features and info
Starting in the 6.15 kernel, VMBus interrupts are automatically assigned away from a CPU that is being taken offline. Add documentation describing this case. Also add details of Hyper-V behavior when the primary channel of a VMBus device is closed as the result of unbinding the device's driver. This behavior has not changed, but it was not previously documented. Signed-off-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/20250520044435.7734-1-mhklinux@outlook.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20250520044435.7734-1-mhklinux@outlook.com>
1 parent dd1af0c commit f77276d

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

Documentation/virt/hyperv/vmbus.rst

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,18 @@ interrupts are not Linux IRQs, there are no entries in /proc/interrupts
250250
or /proc/irq corresponding to individual VMBus channel interrupts.
251251

252252
An online CPU in a Linux guest may not be taken offline if it has
253-
VMBus channel interrupts assigned to it. Any such channel
254-
interrupts must first be manually reassigned to another CPU as
255-
described above. When no channel interrupts are assigned to the
256-
CPU, it can be taken offline.
253+
VMBus channel interrupts assigned to it. Starting in kernel v6.15,
254+
any such interrupts are automatically reassigned to some other CPU
255+
at the time of offlining. The "other" CPU is chosen by the
256+
implementation and is not load balanced or otherwise intelligently
257+
determined. If the CPU is onlined again, channel interrupts previously
258+
assigned to it are not moved back. As a result, after multiple CPUs
259+
have been offlined, and perhaps onlined again, the interrupt-to-CPU
260+
mapping may be scrambled and non-optimal. In such a case, optimal
261+
assignments must be re-established manually. For kernels v6.14 and
262+
earlier, any conflicting channel interrupts must first be manually
263+
reassigned to another CPU as described above. Then when no channel
264+
interrupts are assigned to the CPU, it can be taken offline.
257265

258266
The VMBus channel interrupt handling code is designed to work
259267
correctly even if an interrupt is received on a CPU other than the
@@ -324,3 +332,15 @@ rescinded, neither Hyper-V nor Linux retains any state about
324332
its previous existence. Such a device might be re-added later,
325333
in which case it is treated as an entirely new device. See
326334
vmbus_onoffer_rescind().
335+
336+
For some devices, such as the KVP device, Hyper-V automatically
337+
sends a rescind message when the primary channel is closed,
338+
likely as a result of unbinding the device from its driver.
339+
The rescind causes Linux to remove the device. But then Hyper-V
340+
immediately reoffers the device to the guest, causing a new
341+
instance of the device to be created in Linux. For other
342+
devices, such as the synthetic SCSI and NIC devices, closing the
343+
primary channel does *not* result in Hyper-V sending a rescind
344+
message. The device continues to exist in Linux on the VMBus,
345+
but with no driver bound to it. The same driver or a new driver
346+
can subsequently be bound to the existing instance of the device.

0 commit comments

Comments
 (0)