diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-29 12:39:45 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-29 12:39:45 -1000 |
| commit | 9c7e3d59107e2daf204bf6bf87b6c448ca89defe (patch) | |
| tree | 59e0a03cba2d5dc957b578b0afbb5e95a39fe0ee /Documentation | |
| parent | 1b8b67503725fa6deb3a4f00ea61f982bd00c152 (diff) | |
| parent | 33b28f3b313353f11fc939e9a268605e66290d0b (diff) | |
Merge tag 'hyperv-next-signed-20261028' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linuxHEADmaster
Pull hyperv updates from Wei Liu:
- Update to documents and code comments (Michael Kelley)
- Harden Vmbus (Kameron Carr)
- Rework MSHV driver page deposit logic (Mukesh Rathor)
- Vmbus kexec bug fix (Shradha Gupta)
- Miscellaneous bug fixes (Daehyeon Ko, Jiale Yao, Sasha Levin)
* tag 'hyperv-next-signed-20261028' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
Drivers: hv: Remove leftover support for old Hyper-V versions
mshv: Remove unused *_old memory deposit functions
mshv: Redesign hypervisor memory deposit logic
mshv: Rename memory deposit memory functions to _old
mshv_vtl: reject poll files with multiple waitqueues
mshv_vtl: detach poll waiter on POLLFREE
mshv_vtl: initialize poll file mutex before device registration
Documentation: hyperv: Update information on guest CPU offlining
Documentation: hyperv: Remove support for guests on Hyper-V 2012/2012R2
Drivers: hv: Run VMBus kexec cleanup from syscore shutdown
kexec: Add helper to report an active kexec reboot
tools: hv: remove unused rte_smp_mb()
Documentation: hyperv: Update documentation for sending VMBus packets
Drivers: hv: vmbus: Check ACPI companion before use
Documentation: hyperv: Describe validation of the ring buffer indices
Drivers: hv: vmbus: Keep the ring byte counts sane for a bad index
Drivers: hv: vmbus: Compute ring byte counts from a caller-held snapshot
Drivers: hv: vmbus: Use *_ONCE() to access shared ring buffer indices
Drivers: hv: vmbus: Bounds check the shared ring buffer indices
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/networking/device_drivers/ethernet/microsoft/netvsc.rst | 14 | ||||
| -rw-r--r-- | Documentation/virt/hyperv/clocks.rst | 8 | ||||
| -rw-r--r-- | Documentation/virt/hyperv/coco.rst | 5 | ||||
| -rw-r--r-- | Documentation/virt/hyperv/overview.rst | 28 | ||||
| -rw-r--r-- | Documentation/virt/hyperv/vmbus.rst | 17 |
5 files changed, 37 insertions, 35 deletions
diff --git a/Documentation/networking/device_drivers/ethernet/microsoft/netvsc.rst b/Documentation/networking/device_drivers/ethernet/microsoft/netvsc.rst index 616f808e885b..0d464706a59a 100644 --- a/Documentation/networking/device_drivers/ethernet/microsoft/netvsc.rst +++ b/Documentation/networking/device_drivers/ethernet/microsoft/netvsc.rst @@ -7,8 +7,9 @@ Hyper-V network driver Compatibility ============= -This driver is compatible with Windows Server 2012 R2, 2016 and -Windows 10. +This driver supports Linux guests running on Windows Server 2016 Hyper-V +and later, and Windows 10 and later. Support for running as a guest on +earlier versions of Hyper-V has been removed from Linux. Features ======== @@ -16,9 +17,8 @@ Features Checksum offload ---------------- The netvsc driver supports checksum offload as long as the - Hyper-V host version does. Windows Server 2016 and Azure - support checksum offload for TCP and UDP for both IPv4 and - IPv6. Windows Server 2012 only supports checksum offload for TCP. + Hyper-V host version does. Windows Server 2016 Hyper-V and later, and + Azure, support checksum offload for TCP and UDP for both IPv4 and IPv6. Receive Side Scaling -------------------- @@ -58,8 +58,8 @@ Large Receive Offload (LRO), or Receive Side Coalescing (RSC) ------------------------------------------------------------- The driver supports LRO/RSC in the vSwitch feature. It reduces the per packet processing overhead by coalescing multiple TCP segments when possible. The - feature is enabled by default on VMs running on Windows Server 2019 and - later. It may be changed by ethtool command:: + feature is enabled by default on VMs running on Windows Server 2019 Hyper-V + and later. It may be changed by ethtool command:: ethtool -K eth0 lro on ethtool -K eth0 lro off diff --git a/Documentation/virt/hyperv/clocks.rst b/Documentation/virt/hyperv/clocks.rst index 176043265803..9527e6073654 100644 --- a/Documentation/virt/hyperv/clocks.rst +++ b/Documentation/virt/hyperv/clocks.rst @@ -64,12 +64,8 @@ applying the scale and offset to get the constant 10 MHz clock. Linux clockevents are based on Hyper-V synthetic timer 0 (stimer0). While Hyper-V offers 4 synthetic timers for each CPU, Linux only uses -timer 0. In older versions of Hyper-V, an interrupt from stimer0 -results in a VMBus control message that is demultiplexed by -vmbus_isr() as described in the Documentation/virt/hyperv/vmbus.rst -documentation. In newer versions of Hyper-V, stimer0 interrupts can -be mapped to an architectural interrupt, which is referred to as -"Direct Mode". Linux prefers to use Direct Mode when available. Since +timer 0. stimer0 is operated in what Hyper-V calls "Direct Mode" +where timer interrupts are mapped to an architectural interrupt. Since x86/x64 doesn't support per-CPU interrupts, Direct Mode statically allocates an x86 interrupt vector (HYPERV_STIMER0_VECTOR) across all CPUs and explicitly codes it to call the stimer0 interrupt handler. Hence diff --git a/Documentation/virt/hyperv/coco.rst b/Documentation/virt/hyperv/coco.rst index 3231e51444da..3e20249bd9b3 100644 --- a/Documentation/virt/hyperv/coco.rst +++ b/Documentation/virt/hyperv/coco.rst @@ -200,7 +200,10 @@ validation is performed. For messages passed from the host to the guest in a VMBus ring buffer, the length of the message is validated, and the message is copied into a temporary (encrypted) buffer for further validation and processing. The copying adds a small amount of overhead, but is the only way -to protect against a malicious host. See hv_pkt_iter_first(). +to protect against a malicious host. See hv_pkt_iter_first(). Similarly, the +ring buffer header is shared with the host, so the guest must snapshot and +validate the read and write indices before using them to index into the ring +buffer or to compute available space. Many drivers for VMBus devices have been "hardened" by adding code to fully validate messages received over VMBus, instead of assuming that Hyper-V is diff --git a/Documentation/virt/hyperv/overview.rst b/Documentation/virt/hyperv/overview.rst index 77408a89d1a4..6c1b9d4b6ddd 100644 --- a/Documentation/virt/hyperv/overview.rst +++ b/Documentation/virt/hyperv/overview.rst @@ -114,11 +114,13 @@ a shared page or remove an overlay page after the new kernel is using the page for a different purpose, corrupting the new kernel. Hyper-V does not provide a single "set everything" operation to guest VMs, so Linux code must individually revoke all sharing before -doing kexec. See hv_kexec_handler() and hv_crash_handler(). But -the crash/panic path still has holes in cleanup because some shared -pages are set using per-CPU synthetic registers and there's no -mechanism to revoke the shared pages for CPUs other than the CPU -running the panic path. +doing kexec. For a normal kexec reboot, the VMBus driver calls +hv_kexec_handler() from its syscore shutdown callback, after device +shutdown and before the architecture-specific machine shutdown. The +crash/panic path uses hv_crash_handler(), but still has holes in +cleanup because some shared pages are set using per-CPU synthetic +registers and there is no mechanism to revoke the shared pages for +CPUs other than the CPU running the panic path. CPU Management -------------- @@ -132,11 +134,11 @@ Starting in Windows Server 2022 Hyper-V, the ACPI tables reflect only the CPUs actually present in the VM, so Linux does not report any hot-add CPUs. -A Linux guest CPU may be taken offline using the normal Linux -mechanisms, provided no VMBus channel interrupts are assigned to -the CPU. See the section on VMBus Interrupts for more details -on how VMBus channel interrupts can be re-assigned to permit -taking a CPU offline. +A Linux guest CPU may be taken offline, and subsequently brought +back online, using the normal Linux mechanisms. See the "VMBus +Interrupts" section of Documentation/virt/hyperv/vmbus.rst +documentation for how VMBus channel interrupts are automatically +re-assigned if necessary when taking a CPU offline. 32-bit and 64-bit ----------------- @@ -157,9 +159,9 @@ when accessing data shared with Hyper-V. Versioning ---------- Current Linux kernels operate correctly with older versions of -Hyper-V back to Windows Server 2012 Hyper-V. Support for running -on the original Hyper-V release in Windows Server 2008/2008 R2 -has been removed. +Hyper-V back to Windows Server 2016 Hyper-V and Windows 10. Support for +running on Windows Server 2012/2012 R2, Windows Server 2008/2008 R2, +and Windows 8.1 and earlier has been removed. A Linux guest on Hyper-V outputs in dmesg the version of Hyper-V it is running on. This version is in the form of a Windows build diff --git a/Documentation/virt/hyperv/vmbus.rst b/Documentation/virt/hyperv/vmbus.rst index 654bb4849972..c546e821ce6b 100644 --- a/Documentation/virt/hyperv/vmbus.rst +++ b/Documentation/virt/hyperv/vmbus.rst @@ -141,14 +141,15 @@ Three functions exist to send VMBus channel messages: 1. vmbus_sendpacket(): Control-only messages and messages with embedded data -- no GPAs -2. vmbus_sendpacket_pagebuffer(): Message with list of GPAs - identifying data to transfer. An offset and length is - associated with each GPA so that multiple discontinuous areas - of guest memory can be targeted. -3. vmbus_sendpacket_mpb_desc(): Message with list of GPAs - identifying data to transfer. A single offset and length is - associated with a list of GPAs. The GPAs must describe a - single logical area of guest memory to be targeted. +2. vmbus_sendpacket_getid(): Similar to vmbus_sendpacket() but returns + a transaction ID that is matched against a reply from the Hyper-V + host. Useful when the struct completion (or other rendezvous data) + must reside on the caller's stack. By invalidating the transaction + ID before exiting the function due to a timeout or other error, a + late arriving interrupt is assured to not trash the stack. +3. vmbus_sendpacket_mpb_desc(): Message with one or more data ranges + to target. Each range consists of a single offset and length plus + a list of GPAs that describe a logical area of guest memory. Historically, Linux guests have trusted Hyper-V to send well-formed and valid messages, and Linux drivers for synthetic devices did not |
