Date: Fri, 10 Jul 2020 07:26:50 +0000 (UTC) From: Peter Grehan <grehan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363070 - head/usr.sbin/bhyve Message-ID: <202007100726.06A7Qok6039620@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: grehan Date: Fri Jul 10 07:26:50 2020 New Revision: 363070 URL: https://svnweb.freebsd.org/changeset/base/363070 Log: Advertise 64-bit physical-address capability. This fixes a coredump with NetBSD guests when XHCI is configured. On seeing the AC64 flag clear, the NetBSD XHCI driver was only writing to the lower 32-bits of 64-bit physical address registers. The emulation relies on a write to the hi 32-bits to calculate a host virtual address for internal use, and has always supported 64-bit addressing. All other guests were seen to write to both the lo- and hi- address registers, regardless of the AC64 setting. Discussed with: Leon Dang (author) Tested with: Ubuntu 16/18/20, Windows10, OpenBSD UEFI guests. MFC after: 2 weeks. Modified: head/usr.sbin/bhyve/pci_xhci.c Modified: head/usr.sbin/bhyve/pci_xhci.c ============================================================================== --- head/usr.sbin/bhyve/pci_xhci.c Fri Jul 10 06:47:58 2020 (r363069) +++ head/usr.sbin/bhyve/pci_xhci.c Fri Jul 10 07:26:50 2020 (r363070) @@ -2805,7 +2805,8 @@ pci_xhci_init(struct vmctx *ctx, struct pci_devinst *p sc->hcsparams2 = XHCI_SET_HCSP2_ERSTMAX(XHCI_ERST_MAX) | XHCI_SET_HCSP2_IST(0x04); sc->hcsparams3 = 0; /* no latency */ - sc->hccparams1 = XHCI_SET_HCCP1_NSS(1) | /* no 2nd-streams */ + sc->hccparams1 = XHCI_SET_HCCP1_AC64(1) | /* 64-bit addrs */ + XHCI_SET_HCCP1_NSS(1) | /* no 2nd-streams */ XHCI_SET_HCCP1_SPC(1) | /* short packet */ XHCI_SET_HCCP1_MAXPSA(XHCI_STREAMS_MAX); sc->hccparams2 = XHCI_SET_HCCP2_LEC(1) |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007100726.06A7Qok6039620>