From owner-freebsd-virtualization@freebsd.org Sat May 18 20:06:44 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 A231D1596EBF for ; Sat, 18 May 2019 20:06:44 +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 108D08EED1 for ; Sat, 18 May 2019 20:06:42 +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 x4IK6e1F066456; Sat, 18 May 2019 13:06:40 -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 x4IK6euM066455; Sat, 18 May 2019 13:06:40 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201905182006.x4IK6euM066455@gndrsh.dnsmgr.net> Subject: Re: Windows 10 guests fail to boot when attempting to passthrough network card In-Reply-To: To: Nick Principe Date: Sat, 18 May 2019 13:06:40 -0700 (PDT) CC: 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: 108D08EED1 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [0.62 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.22)[-0.216,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.69)[0.688,0]; NEURAL_HAM_LONG(-0.79)[-0.792,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: gndrsh.dnsmgr.net]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; 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)[]; 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: Sat, 18 May 2019 20:06:44 -0000 > I have noticed that Windows 10 guests fail to boot when attempting to pass > through a network card. I believe I have observed this with both cxgbe > (t580) and mlx5en cards, but only have a cxgbe to test with now. Without > passthrough, the Windows 10 guest boots and operates normally. > > FreeBSD guests (12.0-RELEASE) have no issue when booting with the cxgbe > card passed through - I can kldload cxgbe and I get both cxl ports showing > up in the FreeBSD guest. > > I have tested this with both 12.0-RELEASE and head (13-CURRENT r347883) as > the host OS with no change in behavior. The bhyve output is: > Unhandled ps2 keyboard command 0x02 > Unhandled ps2 keyboard command 0x02 > Assertion failed: (error == 0), function modify_bar_registration, file > /usr/src/usr.sbin/bhyve/pci_emul.c, line 504. > fbuf frame buffer base: 0x943600000 [sz 16777216] > > Two main suggestions from discussions at BSDCan this week were: > - Capture pciconf -lvb from the FreeBSD guest > - Add some printf to pci_emul.c to capture some values when there is an > error > > I've captured the above, and a lot of other relevant info, in a Google Doc > here (too big to post directly): > https://docs.google.com/document/d/1t-UVIO9Aq0TPUFHyo1nVscqaW1LoPuNhfLPitL8oeTs/edit?usp=sharing > > `nap To confirm what I see from looking at your data could you tell me if this patch triggers a barf? --- mem.c.orig 2019-05-18 20:04:26.707995000 +0000 +++ mem.c 2019-05-18 20:04:02.205119000 +0000 @@ -97,6 +97,7 @@ return (0); } +printf("mmio_rb_lookup: barf ENOENT"); return (ENOENT); } -- Rod Grimes rgrimes@freebsd.org