git: 3807c8be4645 - main - bhyve: Don't set the prefetch flag for large 64-bit memory BARs

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 26 Aug 2026 19:31:46 UTC
The branch main has been updated by jhb:

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

commit 3807c8be4645d7f02c5253aa88b193000e6aef09
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-08-26 19:30:37 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-08-26 19:30:37 +0000

    bhyve: Don't set the prefetch flag for large 64-bit memory BARs
    
    The only device model that can create a large 64-bit memory BAR is the
    passthru device model, and that device model reuses the lobits of the
    existing BAR explicitly.
    
    Fixes:          e87a6f3ef284 ("bhyve: use physical lobits for BARs of passthru devices")
---
 usr.sbin/bhyve/pci_emul.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c
index 7637049f0dd9..c5498a5e57fa 100644
--- a/usr.sbin/bhyve/pci_emul.c
+++ b/usr.sbin/bhyve/pci_emul.c
@@ -918,8 +918,7 @@ pci_emul_assign_bar(struct pci_devinst *const pdi, const int idx,
 			baseptr = &pci_emul_membase64;
 			limit = pci_emul_memlim64;
 			mask = PCIM_BAR_MEM_BASE;
-			lobits = PCIM_BAR_MEM_SPACE | PCIM_BAR_MEM_64 |
-				 PCIM_BAR_MEM_PREFETCH;
+			lobits = PCIM_BAR_MEM_SPACE | PCIM_BAR_MEM_64;
 		} else {
 			baseptr = &pci_emul_membase32;
 			limit = PCI_EMUL_MEMLIMIT32;