bhyve: ahci: Fix regression with no ports
authorRyan Moeller <freqlabs@FreeBSD.org>
Fri, 21 Jan 2022 12:59:25 +0000 (12:59 +0000)
committerRyan Moeller <freqlabs@FreeBSD.org>
Fri, 21 Jan 2022 12:59:25 +0000 (12:59 +0000)
commitb252fb24301c1f7e7d83eab631e7d9fa947e227d
tree0fce75aaff7c232a16fbc5595a2087688bb10670
parenteb815a7419409056c65eb027c2b24b4e616480e8
bhyve: ahci: Fix regression with no ports

An AHCI controller may be specified with no connected ports.  Avoid
dumping core in this case for compatibility with existing VM configs.

Reviewed by: khng, jhb
Fixes: 621b5090487de Refactor configuration management in bhyve.
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D33969
usr.sbin/bhyve/pci_ahci.c