]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net/mlx5: Add IFC bits for migration state
authorYishai Hadas <yishaih@nvidia.com>
Tue, 17 Mar 2026 16:17:51 +0000 (18:17 +0200)
committerAlex Williamson <alex@shazbot.org>
Thu, 19 Mar 2026 18:32:09 +0000 (12:32 -0600)
Add the relevant IFC bits for querying an extra migration state from the
device.

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20260317161753.18964-5-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
include/linux/mlx5/mlx5_ifc.h

index 775cb0c56865feaf0c545ad8f304153f51f6dc37..1c8922c58c8f6b1a511ce498850ae286f4a24bbd 100644 (file)
@@ -2173,7 +2173,8 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
        u8         sf_eq_usage[0x1];
        u8         reserved_at_d3[0x5];
        u8         multiplane[0x1];
-       u8         reserved_at_d9[0x7];
+       u8         migration_state[0x1];
+       u8         reserved_at_da[0x6];
 
        u8         cross_vhca_object_to_object_supported[0x20];
 
@@ -13280,13 +13281,24 @@ struct mlx5_ifc_query_vhca_migration_state_in_bits {
        u8         reserved_at_60[0x20];
 };
 
+enum {
+       MLX5_QUERY_VHCA_MIG_STATE_UNINITIALIZED = 0x0,
+       MLX5_QUERY_VHCA_MIG_STATE_OPER_MIGRATION_IDLE = 0x1,
+       MLX5_QUERY_VHCA_MIG_STATE_OPER_MIGRATION_READY = 0x2,
+       MLX5_QUERY_VHCA_MIG_STATE_OPER_MIGRATION_DIRTY = 0x3,
+       MLX5_QUERY_VHCA_MIG_STATE_OPER_MIGRATION_INIT = 0x4,
+};
+
 struct mlx5_ifc_query_vhca_migration_state_out_bits {
        u8         status[0x8];
        u8         reserved_at_8[0x18];
 
        u8         syndrome[0x20];
 
-       u8         reserved_at_40[0x40];
+       u8         reserved_at_40[0x20];
+
+       u8         migration_state[0x4];
+       u8         reserved_at_64[0x1c];
 
        u8         required_umem_size[0x20];