From owner-freebsd-hackers@freebsd.org Thu Dec 12 20:04:24 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 489E41D9E6B for ; Thu, 12 Dec 2019 20:04:24 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47YlBG3SGQz442h for ; Thu, 12 Dec 2019 20:04:22 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id xBCK4b16087160 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 12 Dec 2019 21:04:37 +0100 (CET) (envelope-from puchar-wojtek@puchar.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puchar.net; s=default; t=1576181077; bh=t9qIwn9NI3jVLbOgTsuuFma8g5N20wl4DT42zZ8/yGw=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=omD7Gow+3OZasNcdnHJVOfwaopNIawoxn34RFLRJt67FQaZGypZYvAohcJ99NiS9A REFbRMC+EaYlhni9n1Im72SdQDcDSIoZS5lEhQ4/PsaonoPJrBfqbphZa/ukLm3mH5 13d70xkxh/64JqBWblvndxbvt1yPI12nBwZw0bbc= Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id xBCK4bmE087156; Thu, 12 Dec 2019 21:04:37 +0100 (CET) (envelope-from puchar-wojtek@puchar.net) Date: Thu, 12 Dec 2019 21:04:37 +0100 (CET) From: Wojciech Puchar To: Wojciech Puchar cc: freebsd-hackers@freebsd.org Subject: Re: bhyve+PCIe passthrough = UEFI fail to boot In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 47YlBG3SGQz442h X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=fail (rsa verify failed) header.d=puchar.net header.s=default header.b=omD7Gow+; dmarc=none; spf=pass (mx1.freebsd.org: domain of wojtek@puchar.net designates 194.1.144.90 as permitted sender) smtp.mailfrom=wojtek@puchar.net X-Spamd-Result: default: False [-4.51 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_REJECT(1.00)[puchar.net:s=default]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[puchar.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[puchar.net:-]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[90.144.1.194.list.dnswl.org : 127.0.10.0]; IP_SCORE(-3.21)[ip: (-8.47), ipnet: 194.1.144.0/24(-4.24), asn: 43476(-3.39), country: PL(0.07)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2019 20:04:24 -0000 nobody have idea what's wrong? On Wed, 11 Dec 2019, Wojciech Puchar wrote: > i added PCIe USB controller card to server to be used in windows virtual > machine, so i can have USB key (copy protection software for one app) visible > directly in windows. USB key is pendrive compatible (actually you can use it > as pendrive) + some propertiary functions. shouldn't matter IMHO as windows > would handle it. > > i installed it. and as with instruction here > > https://wiki.freebsd.org/bhyve/pci_passthru > > i first booted freebsd, checked if it's detected (it was, as xhci1), then > used pciconf -lv and got > > ppt0@pci0:2:0:0: class=0x0c0330 card=0xffffffff chip=0x01941033 > rev=0x03 hdr=0x00 > vendor = 'NEC Corporation' > device = 'uPD720200 USB 3.0 Host Controller' > class = serial bus > subclass = USB > > > so i put > pptdevs="2/0/0" > > in loader.conf and rebooted. xhci1 doesn't show up again so everything seemed > fine. > > then i modified my bhyve startup > > /usr/sbin/bhyve -s 0,hostbridge -m 22528M -H -S -c > cpus=12,sockets=1,cores=12,threads=1 \ > -s 7,fbuf,rfb=10.10.10.1:5900,password=passwordhere \ > -s 3,ahci,hd:/dev/ada2p5.eli,hd:/dev/ada2p6.eli,hd:/dev/ada2p127.eli \ > -s 5,virtio-net,tap0,mac=08:00:27:b7:ca:16 \ > -s 30,virtio-rnd -s 31,lpc -U 0072c755-0e33-11ea-a92a-3c52820d28a6 \ > -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -w windows > > > by adding -s 8,passthru,2/0/0 \ > > this resulted in UEFI boot failed. in uefi shell i was unable to display > directory of disk drive (attached screen shot). > > i've tried to change -s 8 to other numbers like 2,10,20 - no difference. > > What i'm doing wrong? > > 11.3-STABLE