Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/mthca: Don't use privileged UAR for kernel access

Make kernel use UAR2 instead of UAR1 for hardware access: this adds
sanity checking from the hardware side, without any performance cost.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by

Michael S. Tsirkin and committed by
Roland Dreier
9fd558f4 b2707573

+1 -1
+1 -1
drivers/infiniband/hw/mthca/mthca_uar.c
··· 60 60 ret = mthca_alloc_init(&dev->uar_table.alloc, 61 61 dev->limits.num_uars, 62 62 dev->limits.num_uars - 1, 63 - dev->limits.reserved_uars); 63 + dev->limits.reserved_uars + 1); 64 64 if (ret) 65 65 return ret; 66 66