From owner-freebsd-virtualization@freebsd.org Thu Mar 1 14:28:25 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 8E324F2F71E for ; Thu, 1 Mar 2018 14:28:25 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (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 21E5468933 for ; Thu, 1 Mar 2018 14:28:25 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [78.138.80.135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id w21ESOvV035448; Thu, 1 Mar 2018 15:28:24 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id C3410312; Thu, 1 Mar 2018 15:28:23 +0100 (CET) Message-ID: <5A980E07.3020901@omnilan.de> Date: Thu, 01 Mar 2018 15:28:23 +0100 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Ludovit Koren CC: freebsd-virtualization@freebsd.org Subject: Re: bhyve - windows7 installation References: <86inagi7jy.fsf@gmail.com> <5A97E07B.7060000@omnilan.de> <86efl3j4y5.fsf@gmail.com> In-Reply-To: <86efl3j4y5.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Greylist: ACL 130 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Thu, 01 Mar 2018 15:28:24 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) 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:28:25 -0000 Bezüglich Ludovit Koren's Nachricht vom 01.03.2018 14:33 (localtime): >>>>>> Harry Schmalzbauer writes: … > > I'd suggest the following mass storage config (adding a second ODD with > > the virtio-141 drivers): > > -s > > 3,ahci,hd:/dev/zvol/zroot/msw7,sectorsize=512/8192,cd:./en_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677791.iso,cd:./virtio-win-0.1.141.iso > > > 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 > > > The intention is to have usb device in the windows. > > Any suggestions? Unfortunately I can only tell that this is a known limitation/bug. For some background, you can see https://lists.freebsd.org/pipermail/freebsd-virtualization/2015-December/004000.html and https://lists.freebsd.org/pipermail/freebsd-virtualization/2016-December/005012.html and a quote from mav@: Bezüglich Alexander Motin's Nachricht vom 29.12.2016 11:32 (localtime): >> ppt0@pci0:6:0:0: class=0x010601 card=0x10601b21 chip=0x06121b21 >> > rev=0x01 hdr=0x00 >> > bar [10] = type I/O Port, range 32, base 0x5050, size 8, enabled >> > bar [14] = type I/O Port, range 32, base 0x5040, size 4, enabled >> > bar [18] = type I/O Port, range 32, base 0x5030, size 8, enabled >> > bar [1c] = type I/O Port, range 32, base 0x5020, size 4, enabled >> > bar [20] = type I/O Port, range 32, base 0x5000, size 32, enabled >> > bar [24] = type Memory, range 32, base 0xc3e10000, size 512, enabled > I believe it is bhyve bug, since these values are just what hardware > reports. BAR size of 512 bytes indeed does not align to 4K, but this > not our problem. :) As long as your controller supports MSI (message signaling interrupts), you correctly assigned ppt(4) and there's nothing non-hackers can do. To play the same old song: I'm short in skills resp. time to investigate further. Mabye you want to search/file a PR at https://bugs.freebsd.org/bugzilla/ -harry