diff options
author | Peter Grehan <grehan@FreeBSD.org> | 2020-07-10 07:26:50 +0000 |
---|---|---|
committer | Peter Grehan <grehan@FreeBSD.org> | 2020-07-10 07:26:50 +0000 |
commit | fb5f5a17ef0a4c25c8f1110c8f4f3f417dfaba01 (patch) | |
tree | abdbd43cf3e423958dcdc27d95b7cfc71352f5c8 /usr.sbin/bhyve | |
parent | 6c69e697249b4125ab89c3c4ec1315905dff3517 (diff) | |
download | src-test2-fb5f5a17ef0a4c25c8f1110c8f4f3f417dfaba01.tar.gz src-test2-fb5f5a17ef0a4c25c8f1110c8f4f3f417dfaba01.zip |
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.
Notes
Notes:
svn path=/head/; revision=363070
Diffstat (limited to 'usr.sbin/bhyve')
-rw-r--r-- | usr.sbin/bhyve/pci_xhci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/pci_xhci.c b/usr.sbin/bhyve/pci_xhci.c index 06860e8dabe9..7a91a2dc9172 100644 --- a/usr.sbin/bhyve/pci_xhci.c +++ b/usr.sbin/bhyve/pci_xhci.c @@ -2805,7 +2805,8 @@ pci_xhci_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) 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) | |