net/mlx4_core: Prevent VF from changing port configuration
Added wrapper to the ACCESS_REG command for handling guest HW
registers access, preventing write operations, but do allow reads.
This will prevent SRIOV guests to change port PTYS configuration,
such as speed/advertised link modes.
Fixes: adbc7ac5c1
('net/mlx4_core: Introduce ACCESS_REG CMD [...]')
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d75b1ade56
commit
6e80669998
@@ -1345,7 +1345,7 @@ static struct mlx4_cmd_info cmd_info[] = {
|
||||
.out_is_imm = false,
|
||||
.encode_slave_id = false,
|
||||
.verify = NULL,
|
||||
.wrapper = NULL,
|
||||
.wrapper = mlx4_ACCESS_REG_wrapper,
|
||||
},
|
||||
/* Native multicast commands are not available for guests */
|
||||
{
|
||||
|
Reference in New Issue
Block a user