aboutsummaryrefslogtreecommitdiff
path: root/lib/libdevctl
diff options
context:
space:
mode:
authorChuck Tuffli <chuck@FreeBSD.org>2019-04-05 16:54:16 +0000
committerChuck Tuffli <chuck@FreeBSD.org>2019-04-05 16:54:16 +0000
commitfe1b713e2cba0d02c0562c5cffe029d7461b3888 (patch)
tree06c001e8810ccb2208858d288b6e6150bdb98902 /lib/libdevctl
parent4ae3f5a7fd33b06aa4d5b2d9a6e2de3e0155d23a (diff)
downloadsrc-fe1b713e2cba0d02c0562c5cffe029d7461b3888.tar.gz
src-fe1b713e2cba0d02c0562c5cffe029d7461b3888.zip
bhyve: Fix NVMe BAR size calculation
The NVMe specification defines bits 13:4 of BAR0 as Reserved (i.e. 0x0). Most drivers do not enforce this, but the Windows NVMe driver does and will refuse to start the device (i.e. error 10) if any of these bits are set. The current BAR size calculation tries to minimize the amount of memory the device reserves by scaling the BAR size by the maximum number of queues supported by the device. But unless the device supports a large number of queue pairs (over 1536), it will reserve too little memory. The fix is to allocate a minimum of 16K bytes for BAR0. Tested on Windows Server 2016 and 2019 Reviewed by: imp (mentor), araujo, jhb, bhyve Approved by: imp (mentor), bhyve (jhb) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19676
Notes
Notes: svn path=/head/; revision=345956
Diffstat (limited to 'lib/libdevctl')
0 files changed, 0 insertions, 0 deletions