From owner-freebsd-virtualization@freebsd.org Tue May 21 16:48:12 2019 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79B9815B2324 for ; Tue, 21 May 2019 16:48:12 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 293E26E05C; Tue, 21 May 2019 16:48:07 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x4LGm5ju079976; Tue, 21 May 2019 09:48:05 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x4LGm5eW079975; Tue, 21 May 2019 09:48:05 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201905211648.x4LGm5eW079975@gndrsh.dnsmgr.net> Subject: Re: Windows 10 guests fail to boot when attempting to passthrough network card In-Reply-To: <4460bfe3-ccc8-f982-9097-954c01331502@FreeBSD.org> To: John Baldwin Date: Tue, 21 May 2019 09:48:05 -0700 (PDT) CC: "Rodney W. Grimes" , Robert Crowston , freebsd-virtualization@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 293E26E05C X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [0.43 / 15.00]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[cached: gndrsh.dnsmgr.net]; NEURAL_HAM_SHORT(-0.28)[-0.278,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-0.57)[-0.574,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.35)[0.347,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[]; IP_SCORE(0.05)[ip: (0.16), ipnet: 69.59.192.0/19(0.08), asn: 13868(0.05), country: US(-0.06)] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 16:48:12 -0000 > On 5/19/19 6:24 AM, Rodney W. Grimes wrote: > >> Does the card have multiple BARs? Can you send us the output of pciconf -lvb for the card? > >> > >> There is a bug in bhyve where if the OS assigns the 0xffffffff sentinel to more than one BAR simultaneously it is not compatible with bhyve?s memory model for the guest. > > > > The "we talked" below is myself and Nick talking about exactly that > > which came from jhb@ pointing out to me in a hall wall > > conversation here at BSDCan that this is the cause of this > > problem and is a known issue. > > > > Does anyone have fixes for this issue? > > I have not tested this at all, but I have a candidate patch to fix the root > issue at https://github.com/freebsd/freebsd/compare/master...bsdjhb:bhyve_passthrough_barsize Could you please factor out the white space changes and do that seperately and sooner, it clouds the S/N in this review a bit. > My first guess at the problem wasn't quite right (though Windows does indeed size > BARs in parallel). For pass-through devices we aren't currently correctly disabling > access to a BAR when the guest disables it in the PCI command register which in > turn trips the assertion when using a Windows guest, but in general we need to be > honoring the enable bits when set or cleared by the guest. That makes more since to me. Thanks. > -- > John Baldwin -- Rod Grimes rgrimes@freebsd.org