From: Michael Kelley <mhkelley58@gmail.com>
To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, longli@microsoft.com, tglx@kernel.org,
mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
hpa@zytor.com, daniel.lezcano@kernel.org,
ssengar@linux.microsoft.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
simona@ffwll.ch, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com, sgarzare@redhat.com,
horms@kernel.org
Cc: x86@kernel.org, linux-hyperv@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
netdev@vger.kernel.org, linux-scsi@vger.kernel.org,
virtualization@lists.linux.dev
Subject: [RESEND PATCH 1/6] Drivers: hv: Remove support for WS2012/2012R2 & Win8/8.1 version of Hyper-V
Date: Thu, 30 Jul 2026 13:11:18 -0700 [thread overview]
Message-ID: <20260730201123.1767-2-mhklinux@outlook.com> (raw)
In-Reply-To: <20260730201123.1767-1-mhklinux@outlook.com>
Linux code for running as a Hyper-V guest includes special cases for
running on Hyper-V in WS2012/2012R2 and Windows 8/8.1. These versions
were initially released 14 years ago, and official support ended in 2023
(unless a customer has contracted for extended security updates). Given
the release of subsequent versions with improved functionality, there's
no need to continue to support the latest Linux kernels on these versions
of Hyper-V. If someone is running Linux on one of these older Hyper-V
versions and doesn't want to upgrade, they can continue to do so as
presumably they don't want upgrade the Linux version either.
Simplify Linux code by removing special cases for running on these
old versions of Hyper-V. Remove the negotiation of the VMBus protocol
versions for WS2012/Win8, and remove special case code based on those
VMBus protocol versions. Also update the balloon and snapshot drivers
to no longer negotiate driver-specific protocol versions for these
older Hyper-V versions, and remove any related special cases.
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
---
drivers/hv/channel_mgmt.c | 4 ----
drivers/hv/connection.c | 8 ++++----
drivers/hv/hv_balloon.c | 36 +++++++++++++++---------------------
drivers/hv/hv_snapshot.c | 5 -----
include/linux/hyperv.h | 5 ++---
5 files changed, 21 insertions(+), 37 deletions(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 89d214dda360..84dc56a06c78 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -933,10 +933,6 @@ void vmbus_initiate_unload(bool crash)
if (xchg(&vmbus_connection.conn_state, DISCONNECTED) == DISCONNECTED)
return;
- /* Pre-Win2012R2 hosts don't support reconnect */
- if (vmbus_proto_version < VERSION_WIN8_1)
- return;
-
reinit_completion(&vmbus_connection.unload_event);
memset(&hdr, 0, sizeof(struct vmbus_channel_message_header));
hdr.msgtype = CHANNELMSG_UNLOAD;
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index 0fd50d4cb573..a9e87cf3f51c 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -47,7 +47,9 @@ EXPORT_SYMBOL_GPL(vmbus_proto_version);
/*
* Table of VMBus versions listed from newest to oldest.
- * VERSION_WIN7 and VERSION_WS2008 are no longer supported in
+ * VERSION_WIN7,VERSION_WS2008, VERSION_WIN8 (which is
+ * Windows Server 2012) and VERSION_WIN8_1 (which is
+ * Windows Server 2012 R2) are no longer supported in
* Linux guests and are not listed.
*/
static __u32 vmbus_versions[] = {
@@ -57,9 +59,7 @@ static __u32 vmbus_versions[] = {
VERSION_WIN10_V5_1,
VERSION_WIN10_V5,
VERSION_WIN10_V4_1,
- VERSION_WIN10,
- VERSION_WIN8_1,
- VERSION_WIN8
+ VERSION_WIN10
};
/*
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 42ce27be344d..9cba97e81111 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -58,6 +58,10 @@
#define DYNMEM_MAJOR_VERSION(Version) ((__u32)(Version) >> 16)
#define DYNMEM_MINOR_VERSION(Version) ((__u32)(Version) & 0xff)
+/*
+ * VERSION_1 and VERSION_2 are retained for the historical record,
+ * but are no longer supported in Linux guests.
+ */
enum {
DYNMEM_PROTOCOL_VERSION_1 = DYNMEM_MAKE_VERSION(0, 3),
DYNMEM_PROTOCOL_VERSION_2 = DYNMEM_MAKE_VERSION(1, 0),
@@ -65,9 +69,7 @@ enum {
DYNMEM_PROTOCOL_VERSION_WIN7 = DYNMEM_PROTOCOL_VERSION_1,
DYNMEM_PROTOCOL_VERSION_WIN8 = DYNMEM_PROTOCOL_VERSION_2,
- DYNMEM_PROTOCOL_VERSION_WIN10 = DYNMEM_PROTOCOL_VERSION_3,
-
- DYNMEM_PROTOCOL_VERSION_CURRENT = DYNMEM_PROTOCOL_VERSION_WIN10
+ DYNMEM_PROTOCOL_VERSION_WIN10 = DYNMEM_PROTOCOL_VERSION_3
};
/*
@@ -1434,19 +1436,9 @@ static void version_resp(struct hv_dynmem_device *dm,
version_req.version.version = dm->next_version;
dm->version = version_req.version.version;
- /*
- * Set the next version to try in case current version fails.
- * Win7 protocol ought to be the last one to try.
- */
- switch (version_req.version.version) {
- case DYNMEM_PROTOCOL_VERSION_WIN8:
- dm->next_version = DYNMEM_PROTOCOL_VERSION_WIN7;
- version_req.is_last_attempt = 0;
- break;
- default:
- dm->next_version = 0;
- version_req.is_last_attempt = 1;
- }
+ /* Set the next version to try in case current version fails. */
+ dm->next_version = 0;
+ version_req.is_last_attempt = 1;
ret = vmbus_sendpacket(dm->dev->channel, &version_req,
sizeof(struct dm_version_request),
@@ -1735,16 +1727,18 @@ static int balloon_connect_vsp(struct hv_device *dev)
/*
* Initiate the hand shake with the host and negotiate
- * a version that the host can support. We start with the
- * highest version number and go down if the host cannot
- * support it.
+ * a version that the host can support. The mechanism is in place
+ * to start with the highest version number and go down if the host
+ * cannot support it. But currently we only try the WIN10 version
+ * since support for older Hyper-V versions has been removed from
+ * Linux.
*/
memset(&version_req, 0, sizeof(struct dm_version_request));
version_req.hdr.type = DM_VERSION_REQUEST;
version_req.hdr.size = sizeof(struct dm_version_request);
version_req.hdr.trans_id = atomic_inc_return(&trans_id);
version_req.version.version = DYNMEM_PROTOCOL_VERSION_WIN10;
- version_req.is_last_attempt = 0;
+ version_req.is_last_attempt = 1;
dm_device.version = version_req.version.version;
ret = vmbus_sendpacket(dev->channel, &version_req,
@@ -1964,7 +1958,7 @@ static int balloon_probe(struct hv_device *dev,
#endif
dm_device.dev = dev;
dm_device.state = DM_INITIALIZING;
- dm_device.next_version = DYNMEM_PROTOCOL_VERSION_WIN8;
+ dm_device.next_version = 0;
init_completion(&dm_device.host_event);
init_completion(&dm_device.config_event);
INIT_LIST_HEAD(&dm_device.ha_region_list);
diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_snapshot.c
index 506871aeacf0..847dc69e8250 100644
--- a/drivers/hv/hv_snapshot.c
+++ b/drivers/hv/hv_snapshot.c
@@ -372,11 +372,6 @@ static void vss_on_reset(void)
int
hv_vss_init(struct hv_util_service *srv)
{
- if (vmbus_proto_version < VERSION_WIN8_1) {
- pr_warn("Integration service 'Backup (volume snapshot)'"
- " not supported on this host version.\n");
- return -ENOTSUPP;
- }
recv_buffer = srv->recv_buffer;
vss_transaction.recv_channel = srv->channel;
vss_transaction.recv_channel->max_pkt_size = VSS_MAX_PKT_SIZE;
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index a2b484679eb4..9652083b6798 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -260,9 +260,8 @@ static inline u32 hv_get_avail_to_write_percent(
* 5 . 2 (Windows Server 2019, RS5)
* 5 . 3 (Windows Server 2022)
*
- * The WS2008 and WIN7 versions are listed here for
- * completeness but are no longer supported in the
- * Linux kernel.
+ * The WS2008, WIN7, WIN8, and WIN8_1 versions are listed here for
+ * completeness but are no longer supported in the Linux kernel.
*/
#define VMBUS_MAKE_VERSION(MAJ, MIN) ((((u32)MAJ) << 16) | (MIN))
--
2.25.1
next prev parent reply other threads:[~2026-07-30 20:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 20:11 [RESEND PATCH 0/6] Remove support for Windows Server 2012/2012R2 & Win8/Win8.1 versions of Hyper-V Michael Kelley
2026-07-30 20:11 ` Michael Kelley [this message]
2026-07-30 20:11 ` [RESEND PATCH net-next 2/6] hv_sock: Remove check for old Hyper-V hosts Michael Kelley
2026-07-30 20:46 ` Andrew Lunn
2026-07-30 20:11 ` [RESEND PATCH net-next 3/6] hv_netvsc: Remove GPADL teardown special case " Michael Kelley
2026-07-30 20:11 ` [RESEND PATCH 4/6] drm_hyperv: Remove support for synth video protocol of " Michael Kelley
2026-07-30 20:11 ` [RESEND PATCH 5/6] scsi: storvsc: Remove support for storvsc " Michael Kelley
2026-07-30 20:11 ` [RESEND PATCH 6/6] clocksource: hyper-v: Remove support for stimer interrupts in message mode Michael Kelley
2026-07-30 22:24 ` [RESEND PATCH 0/6] Remove support for Windows Server 2012/2012R2 & Win8/Win8.1 versions of Hyper-V Hamza Mahfooz
2026-07-30 22:45 ` Dave Hansen
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=20260730201123.1767-2-mhklinux@outlook.com \
--to=mhkelley58@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=airlied@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=bp@alien8.de \
--cc=daniel.lezcano@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=edumazet@google.com \
--cc=haiyangz@microsoft.com \
--cc=horms@kernel.org \
--cc=hpa@zytor.com \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=martin.petersen@oracle.com \
--cc=mhklinux@outlook.com \
--cc=mingo@redhat.com \
--cc=mripard@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sgarzare@redhat.com \
--cc=simona@ffwll.ch \
--cc=ssengar@linux.microsoft.com \
--cc=tglx@kernel.org \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux.dev \
--cc=wei.liu@kernel.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox