git: 08c41a679b28 - main - ixv: Reject unsupported E610 Hyper-V VFs

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Sun, 16 Aug 2026 01:06:52 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=08c41a679b281505eb7f1fd0cb528f3c1fe87fed

commit 08c41a679b281505eb7f1fd0cb528f3c1fe87fed
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-01 02:42:28 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-16 01:06:42 +0000

    ixv: Reject unsupported E610 Hyper-V VFs
    
    E610 Hyper-V VFs use PCI configuration space communication instead of
    the native PF/VF mailbox.  The generic E610 match currently attaches
    native mailbox operations to those devices, and the imported Hyper-V
    subdevice identifier is incorrect.
    
    Correct the subdevice identifier to 0x00ff, as used by DPDK shared
    ixgbe code, and reject that subtype until ixv has a complete Hyper-V
    operations table.
    
    MFC after:      1 week
    Sponsored by:   BBOX.io
---
 sys/dev/ixgbe/if_ixv.c     | 13 ++++++++++++-
 sys/dev/ixgbe/ixgbe_type.h |  2 +-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c
index 6e6d99fa058d..93af5daa01d3 100644
--- a/sys/dev/ixgbe/if_ixv.c
+++ b/sys/dev/ixgbe/if_ixv.c
@@ -87,6 +87,7 @@ static const pci_vendor_info_t ixv_vendor_info_array[] =
  * Function prototypes
  ************************************************************************/
 static void     *ixv_register(device_t);
+static int      ixv_probe(device_t);
 static int      ixv_if_attach_pre(if_ctx_t);
 static int      ixv_if_attach_post(if_ctx_t);
 static int      ixv_if_detach(if_ctx_t);
@@ -163,7 +164,7 @@ static int      ixv_msix_mbx(void *);
 static device_method_t ixv_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_register, ixv_register),
-	DEVMETHOD(device_probe, iflib_device_probe),
+	DEVMETHOD(device_probe, ixv_probe),
 	DEVMETHOD(device_attach, iflib_device_attach),
 	DEVMETHOD(device_detach, iflib_device_detach),
 	DEVMETHOD(device_shutdown, iflib_device_shutdown),
@@ -250,6 +251,16 @@ ixv_register(device_t dev)
 	return (&ixv_sctx_init);
 }
 
+static int
+ixv_probe(device_t dev)
+{
+	if (pci_get_device(dev) == IXGBE_DEV_ID_E610_VF &&
+	    pci_get_subdevice(dev) == IXGBE_SUBDEV_ID_E610_VF_HV)
+		return (ENXIO);
+
+	return (iflib_device_probe(dev));
+}
+
 /************************************************************************
  * ixv_if_tx_queues_alloc
  ************************************************************************/
diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h
index 3194666bd81c..6c7ec0cc3d79 100644
--- a/sys/dev/ixgbe/ixgbe_type.h
+++ b/sys/dev/ixgbe/ixgbe_type.h
@@ -163,7 +163,7 @@
 #define IXGBE_DEV_ID_X550EM_X_VF		0x15A8
 #define IXGBE_DEV_ID_X550EM_X_VF_HV		0x15A9
 #define IXGBE_DEV_ID_E610_VF			0x57AD
-#define IXGBE_SUBDEV_ID_E610_VF_HV		0x0001
+#define IXGBE_SUBDEV_ID_E610_VF_HV		0x00FF
 
 #define IXGBE_CAT(r, m) IXGBE_##r##m