git: f08d1570fa76 - stable/13 - bhyve hostbridge: Rename "device" property to "devid".

John Baldwin jhb at FreeBSD.org
Wed Aug 11 22:14:13 UTC 2021


The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=f08d1570fa760e98d82ec209a948a42dc49ab0da

commit f08d1570fa760e98d82ec209a948a42dc49ab0da
Author:     John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-03-24 16:29:15 +0000
Commit:     John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-08-11 22:12:23 +0000

    bhyve hostbridge: Rename "device" property to "devid".
    
    "device" is already used as the generic PCI-level name of the device
    model to use (e.g. "hostbridge").  The result was that parsing
    "hostbridge" as an integer failed and the host bridge used a device ID
    of 0.  The EFI ROM asserts that the device ID of the hostbridge is not
    0, so booting with the current EFI ROM was failing during the ROM
    boot.
    
    Fixes:          621b5090487de9fed1b503769702a9a2a27cc7bb
    
    (cherry picked from commit 9f40a3be3d5dbddf782c3d1eeaadcd022a4dad01)
---
 usr.sbin/bhyve/bhyve_config.5   | 4 ++--
 usr.sbin/bhyve/pci_hostbridge.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5
index 4e200a779d50..d65040513cb0 100644
--- a/usr.sbin/bhyve/bhyve_config.5
+++ b/usr.sbin/bhyve/bhyve_config.5
@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd March 18, 2021
+.Dd March 24, 2021
 .Dt BHYVE_CONFIG 5
 .Os
 .Sh NAME
@@ -335,7 +335,7 @@ process.
 .It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description
 .It Va vendor Ta integer Ta 0x1275 Ta
 PCI vendor ID.
-.It Va device Ta integer Ta 0x1275 Ta
+.It Va devid Ta integer Ta 0x1275 Ta
 PCI device ID.
 .El
 .Ss AHCI Controller Settings
diff --git a/usr.sbin/bhyve/pci_hostbridge.c b/usr.sbin/bhyve/pci_hostbridge.c
index 7099474eaf92..9fce225bb1d6 100644
--- a/usr.sbin/bhyve/pci_hostbridge.c
+++ b/usr.sbin/bhyve/pci_hostbridge.c
@@ -48,7 +48,7 @@ pci_hostbridge_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl)
 	value = get_config_value_node(nvl, "vendor");
 	if (value != NULL)
 		vendor = strtol(value, NULL, 0);
-	value = get_config_value_node(nvl, "device");
+	value = get_config_value_node(nvl, "devid");
 	if (value != NULL)
 		device = strtol(value, NULL, 0);
 
@@ -69,7 +69,7 @@ pci_amd_hostbridge_legacy_config(nvlist_t *nvl, const char *opts)
 {
 
 	set_config_value_node(nvl, "vendor", "0x1022");	/* AMD */
-	set_config_value_node(nvl, "device", "0x7432");	/* made up */
+	set_config_value_node(nvl, "devid", "0x7432");	/* made up */
 
 	return (0);
 }


More information about the dev-commits-src-branches mailing list