Date: Thu, 10 Jun 2021 15:24:59 +0000 From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 256422] bhyve and Centos/Rocky 8.4 no boot after install Message-ID: <bug-256422-27103-nMENXjR53u@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-256422-27103@https.bugs.freebsd.org/bugzilla/> References: <bug-256422-27103@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256422 --- Comment #7 from Peter Grehan <grehan@FreeBSD.org> --- This looks to be an edge condition in the EFI NVMe driver, caused by the la= rge maximum data transfer size advertised by bhyve NVMe (2MB), and the increase= in size of grubx64.efi from 1.9MB in centos 8.3, to 2.3MB in centos 8.4. In 8.4, EFI attempts to read 2MB of grubx64.efi. However, the buffer starts= at a non page-aligned address, using PRP1 in the command descriptor with an offset. PRP2 points to a PRP list, but with a 2MB transfer size, all 512 PRP entries in a page will be used. Since the first buffer was unaligned, there= is a small amount left at the end, and EFI is putting garbage into that entry. (Copying the smaller 8.3 grubx64.efi to an 8.4 system resulted in a success= ful boot). A suggested fix is to drop the advertised mdts to something that isn't righ= t on the verge of requiring a chained PRP list. Qemu defaults to 512KB, and h/w = I've looked at advertises 256K. e.g. --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -106,7 +106,7 @@ static int nvme_debug =3D 0; #define NVME_MPSMIN_BYTES (1 << (12 + NVME_MPSMIN)) #define NVME_PRP2_ITEMS (PAGE_SIZE/sizeof(uint64_t)) -#define NVME_MDTS 9 +#define NVME_MDTS 7 (or 8) 8.4 boots fine with this change. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-256422-27103-nMENXjR53u>