From owner-freebsd-virtualization@freebsd.org Thu Mar 1 14:06:08 2018 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 C455EF2D738 for ; Thu, 1 Mar 2018 14:06:07 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 1AFEF87677 for ; Thu, 1 Mar 2018 14:06:06 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w21E625X025816; Thu, 1 Mar 2018 06:06:02 -0800 (PST) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w21E62La025815; Thu, 1 Mar 2018 06:06:02 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201803011406.w21E62La025815@pdx.rh.CN85.dnsmgr.net> Subject: Re: bhyve - windows7 installation In-Reply-To: <86efl3j4y5.fsf@gmail.com> To: Ludovit Koren Date: Thu, 1 Mar 2018 06:06:02 -0800 (PST) CC: Harry Schmalzbauer , 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-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 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: Thu, 01 Mar 2018 14:06:08 -0000 > >>>>> Harry Schmalzbauer writes: > > > Bez?glich Ludovit Koren's Nachricht vom 01.03.2018 08:22 (localtime): > >> > >> Hi, ... > > After connecting via VNC the vm boots from DVD and you see the setup > > program. You won't have mouse support, but keyboard's been working, right? > > So you have been able to finsih setup and login via VNC, still no mouse. > > Use your existing setup or do a new one to make the last assumptions true. > > If you booted with the two ISO images, use the keyboard to start > > "control panel/Device Manager", where you should find the unattached > > virtio NIC. Installt/Update the driver from there, you can tell the > > assistant to use e:\ as source (your 2nd. ODD). > > Thank you very much. It is up and running. > > I have an additional question. When I try to run: > > bhyve -c 1 -s 0,hostbridge -s 3,ahci-hd,/dev/zvol/zroot/msw7,sectorsize=512/8192 -s 10,virtio-net,tap1 -s 31,lpc -s 29,fbuf,tcp=0.0.0.0:5900,w=1366,h=768,wait -s 26,passthru,0/26/0 -S -l com1,/dev/nmdm0A -l com2,/dev/nmdm1A -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -m 4G -H -w windows7 > bhyve: passthru device 0/26/0 BAR 0: base 0xd4739000 or size 0x400 not page aligned ^^^^^ > > bhyve: failed to initialize BARs for PCI 0/26/0 > > > > pciconf -vlb ppt0@pci0:0:26:0 > ppt0@pci0:0:26:0: class=0x0c0320 card=0x17df103c chip=0x1e2d8086 rev=0x04 hdr=0x00 > vendor = 'Intel Corporation' > device = '7 Series/C216 Chipset Family USB Enhanced Host Controller' > class = serial bus > subclass = USB > bar [10] = type Memory, range 32, base 0xd4739000, size 1024, enabled ^^^^^^^^^^ Due to the design of the IOMMU you can only manage IO space in page (4096 on x86) granually sizes. The device your trying to pass in has a 1024 byte memory region that is part of a 4096 byte page that may have other things in it. At this time bhyve does not have any way to deal with this, though some other hypervisors have techniques that make this work. I do not have or know of any list of USB controller cards that have 4k aligned and 4k sized BAR's. > The intention is to have usb device in the windows. A discussion recently in the developers conference call touched on this very subject. The basic design would be rather than pass in a whole controller would be to add the ability to pass in individual devices. > Any suggestions? Are you trying to pass in a motherboard resource? You might find an add on USB card that has proper BAR size and alignment, though I have no tips for which ones do or dont. It may also be possible to hack the code to ignore the error IF SECRUITY IS OF NO CONCERN, as this hack would allow the VM guest to access devices outside of its domain. I am uncertain if this might have other side effects as to loss of access to devices in the same page from the host perspective. -- Rod Grimes rgrimes@freebsd.org