git: 5f5b209fa492 - stable/14 - ixv: Reject unsupported E610 Hyper-V VFs

Kevin Bowling <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a8a3dea.2513d.57563940__8309.28049269772$1787444748$gmane$org@gitrepo.freebsd.org>
The branch stable/14 has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=5f5b209fa492595de5ad415975a690345b24e302

commit 5f5b209fa492595de5ad415975a690345b24e302
Author:     Kevin Bowling <[email protected]>
AuthorDate: 2026-08-01 02:42:28 +0000
Commit:     Kevin Bowling <[email protected]>
CommitDate: 2026-08-23 00:24:54 +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.
    
    Sponsored by:   BBOX.io
    
    (cherry picked from commit 08c41a679b281505eb7f1fd0cb528f3c1fe87fed)
---
 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 ba88cc322a62..88aeb32cb9a0 100644
--- a/sys/dev/ixgbe/if_ixv.c
+++ b/sys/dev/ixgbe/if_ixv.c
@@ -78,6 +78,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);
@@ -147,7 +148,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),
@@ -234,6 +235,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 80f8effca6d5..2126b33e0aae 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.