freebsd-dev/usr.sbin/bhyve
Chuck Tuffli fe1b713e2c 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
2019-04-05 16:54:16 +00:00
..
acpi.c Catch up with ACPICA 20190215. 2019-02-21 21:15:49 +00:00
acpi.h
ahci.h
atkbdc.c
atkbdc.h
bhyve.8 Fix spelling of identifier 2019-01-11 14:21:59 +00:00
bhyvegc.c
bhyvegc.h
bhyverun.c Revert r343634: 2019-02-01 03:09:11 +00:00
bhyverun.h
block_if.c In r340042 an attempt to quiet coverity warning cid 1305412 was overdone. 2019-02-15 16:20:21 +00:00
block_if.h
bootrom.c
bootrom.h
console.c
console.h
consport.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
dbgport.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
dbgport.h
fwctl.c Always treat firmware request and response sizes as unsigned. 2018-12-04 18:28:25 +00:00
fwctl.h
gdb.c Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
gdb.h Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
inout.c
inout.h
ioapic.c
ioapic.h
iov.c Fix several iov handling bugs in bhyve virtio-scsi backend. 2018-12-07 20:30:00 +00:00
iov.h Fix several iov handling bugs in bhyve virtio-scsi backend. 2018-12-07 20:30:00 +00:00
Makefile Allow the bhyve VNC server to listen on IPv6 for incoming connections. 2018-10-24 08:45:33 +00:00
Makefile.depend
mem.c
mem.h
mevent_test.c
mevent.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
mevent.h
mptbl.c
mptbl.h
pci_ahci.c Define AHCI_PORT_IDENT and increase by 1 the VTBLK_BLK_ID_BYTES 2018-11-20 22:21:19 +00:00
pci_e82545.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
pci_emul.c Fix bhyve PCIe capability emulation 2019-03-15 02:11:28 +00:00
pci_emul.h Add -s "help" and -l "help" to print a list of supported PCI and LPC devices. 2018-08-22 20:23:08 +00:00
pci_fbuf.c Revert my bogus attempt to silence coverity on r340045, it created 2018-11-07 04:20:29 +00:00
pci_hostbridge.c
pci_irq.c
pci_irq.h
pci_lpc.c Add -s "help" and -l "help" to print a list of supported PCI and LPC devices. 2018-08-22 20:23:08 +00:00
pci_lpc.h Add -s "help" and -l "help" to print a list of supported PCI and LPC devices. 2018-08-22 20:23:08 +00:00
pci_nvme.c bhyve: Fix NVMe BAR size calculation 2019-04-05 16:54:16 +00:00
pci_passthru.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
pci_uart.c
pci_virtio_block.c Define AHCI_PORT_IDENT and increase by 1 the VTBLK_BLK_ID_BYTES 2018-11-20 22:21:19 +00:00
pci_virtio_console.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
pci_virtio_net.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
pci_virtio_rnd.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
pci_virtio_scsi.c Allow CTL device specification in bhyve virtio-scsi. 2018-12-11 20:47:00 +00:00
pci_xhci.c In r340044 an attempt to quiet coverity warning cid 1357336 2019-02-15 16:48:15 +00:00
pci_xhci.h
pm.c
post.c
ps2kbd.c Remove printf for debug purpose forgotten on r340046. 2018-11-02 13:48:06 +00:00
ps2kbd.h
ps2mouse.c
ps2mouse.h
rfb.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
rfb.h
rtc.c
rtc.h
smbiostbl.c Revert r343634: 2019-02-01 03:09:11 +00:00
smbiostbl.h
sockstream.c
sockstream.h
spinup_ap.c
spinup_ap.h
task_switch.c
uart_emul.c bhyve(8): Fix uart emulation bug 2019-03-14 21:08:48 +00:00
uart_emul.h
usb_emul.c
usb_emul.h
usb_mouse.c Revert r343634: 2019-02-01 03:09:11 +00:00
vga.c
vga.h
virtio.c
virtio.h
xmsr.c
xmsr.h