From owner-freebsd-virtualization@freebsd.org Mon Mar 26 06:26:36 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 8D6E3F6F6DC for ; Mon, 26 Mar 2018 06:26:36 +0000 (UTC) (envelope-from nospam@ofloo.net) Received: from loki.ofloo.net (unknown [IPv6:2001:470:7acd:0:1:1:0:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "loki.ofloo.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E72F26D37A; Mon, 26 Mar 2018 06:26:35 +0000 (UTC) (envelope-from nospam@ofloo.net) Received: from [IPv6:fc03:1337:dead:cafe:c52d:3513:57fd:67bc] ([IPv6:fc03:1337:dead:cafe:c52d:3513:57fd:67bc]) by loki.ofloo.net (8.15.2/8.15.2) with ESMTPS id w2Q6PcwK058352 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 26 Mar 2018 06:25:44 GMT (envelope-from nospam@ofloo.net) Subject: Re: bhyve pci passthrough usb controller To: Peter Grehan , freebsd-virtualization@freebsd.org References: <201803240230.w2O2U21F033917@pdx.rh.CN85.dnsmgr.net> <48cef2a2-f8de-1784-9094-daeb2dd7d55a@freebsd.org> From: Wouter Snels Message-ID: <57744ffe-605a-bce5-7d70-864e9ac9c560@ofloo.net> Date: Mon, 26 Mar 2018 08:25:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <48cef2a2-f8de-1784-9094-daeb2dd7d55a@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0CxSYz6WXwKvSgQdEsSKaCPjiJvUk3Jcj" X-Spam-Status: No, score=-1.6 required=5.0 tests=ALL_TRUSTED,BAYES_00, RDNS_NONE,SPF_PASS,TW_AQ,TW_BD,TW_II,TW_KB,TW_PF,TW_TK,TW_VC autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on loki.ofloo.net 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: Mon, 26 Mar 2018 06:26:36 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0CxSYz6WXwKvSgQdEsSKaCPjiJvUk3Jcj Content-Type: multipart/mixed; boundary="7b1ReIjPgK8kBpG6FzBHC0HGTFpdCTxRY"; protected-headers="v1" From: Wouter Snels To: Peter Grehan , freebsd-virtualization@freebsd.org Message-ID: <57744ffe-605a-bce5-7d70-864e9ac9c560@ofloo.net> Subject: Re: bhyve pci passthrough usb controller References: <201803240230.w2O2U21F033917@pdx.rh.CN85.dnsmgr.net> <48cef2a2-f8de-1784-9094-daeb2dd7d55a@freebsd.org> In-Reply-To: <48cef2a2-f8de-1784-9094-daeb2dd7d55a@freebsd.org> --7b1ReIjPgK8kBpG6FzBHC0HGTFpdCTxRY Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: nl-BE Would making the host system boot in legacy help to avoid this? Or is this some other sort of legacy mode you're referring to? Not quite sure but if grasp a bit about what you're saying then, .. then shouldn't it work with the uPD720202 controller since it's not using pci0= =2E pci0: at device 20.0 (no driver attached) pci4: at device 0.0 (no driver attached) # cat /var/run/dmesg.boot Copyright (c) 1992-2017 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The Regents of the University = of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.1-STABLE #1 r331092M: Wed Mar 21 07:06:43 CET 2018 =C2=A0=C2=A0=C2=A0 ofloo@bull:/usr/obj/usr/src/sys/OFL amd64 FreeBSD clang version 5.0.1 (tags/RELEASE_501/final 320880) (based on LLVM 5.0.1) VT(vga): resolution 640x480 CPU: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (3192.16-MHz K8-class CPU) =C2=A0 Origin=3D"GenuineIntel"=C2=A0 Id=3D0x506e3=C2=A0 Family=3D0x6=C2=A0= Model=3D0x5e=C2=A0 Stepping=3D3 =C2=A0 Features=3D0xbfebfbff =C2=A0 Features2=3D0x7ffafbff =C2=A0 AMD Features=3D0x2c100800 =C2=A0 AMD Features2=3D0x121 =C2=A0 Structured Extended Features=3D0x29c6fbf =C2=A0 Structured Extended Features3=3D0xc000000 =C2=A0 XSAVE Features=3D0xf =C2=A0 VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID =C2=A0 TSC: P-state invariant, performance statistics real memory=C2=A0 =3D 8589934592 (8192 MB) avail memory =3D 8010182656 (7639 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs FreeBSD/SMP: 1 package(s) x 4 core(s) random: unblocking device. ioapic0 irqs 0-119 on motherboard SMP: AP CPU #1 Launched! SMP: AP CPU #2 Launched! SMP: AP CPU #3 Launched! Timecounter "TSC-low" frequency 1596078966 Hz quality 1000 random: entropy device external interface kbd1 at kbdmux0 netmap: loaded module module_register_init: MOD_LOAD (vesa, 0xffffffff80f973b0, 0) error 19 random: registering fast source Intel Secure Key RNG random: fast provider: "Intel Secure Key RNG" nexus0 vtvga0: on motherboard cryptosoft0: on motherboard acpi0: on motherboard acpi0: Power Button (fixed) unknown: memory range not supported cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 24000000 Hz quality 950 Event timer "HPET" frequency 24000000 Hz quality 550 Event timer "HPET1" frequency 24000000 Hz quality 440 Event timer "HPET2" frequency 24000000 Hz quality 440 Event timer "HPET3" frequency 24000000 Hz quality 440 Event timer "HPET4" frequency 24000000 Hz quality 440 atrtc0: port 0x70-0x77 irq 8 on acpi0 atrtc0: Warning: Couldn't map I/O. atrtc0: registered as a time-of-day clock, resolution 1.000000s Event timer "RTC" frequency 32768 Hz quality 0 attimer0: port 0x40-0x43,0x50-0x53 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pcib0: _OSC returned error 0x4 pci0: on pcib0 pcib1: irq 16 at device 1.0 on pci0 pci1: on pcib1 vgapci0: port 0xf000-0xf03f mem 0xf6000000-0xf6ffffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0 vgapci0: Boot video device pci0: at device 20.0 (no driver attached) pci0: at device 22.0 (no driver attached) ahci0: port 0xf090-0xf097,0xf080-0xf083,0xf060-0xf07f mem 0xf7248000-0xf7249fff,0xf724c000-0xf724c0ff,0xf724b000-0xf724b7ff irq 17 at device 23.0 on pci0 ahci0: AHCI v1.31 with 4 6Gbps ports, Port Multiplier not supported ahcich0: at channel 0 on ahci0 ahcich1: at channel 1 on ahci0 ahcich2: at channel 2 on ahci0 ahcich3: at channel 3 on ahci0 ahciem0: on ahci0 pcib2: irq 16 at device 28.0 on pci0 pci2: on pcib2 pcib3: at device 0.0 on pci2 pci3: on pcib3 xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xe000-0xe07f mem 0xf7120000-0xf712007f irq 16 at device 0.0 on pci3 miibus0: on xl0 bmtphy0: PHY 24 on miibus0 bmtphy0:=C2=A0 none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto= , auto-flow xl0: Ethernet address: 00:50:04:69:e4:82 pcib4: irq 18 at device 28.6 on pci0 pci4: on pcib4 pci4: at device 0.0 (no driver attached) isab0: at device 31.0 on pci0 isa0: on isab0 pci0: at device 31.2 (no driver attached) hdac0: mem 0xf7240000-0xf7243fff,0xf7220000-0xf722ffff irq 16 at device 31.3 on pci0= em0: mem 0xf7200000-0xf721ffff irq 19 at device 31.6 on pci0 em0: Using an MSI interrupt em0: Ethernet address: 50:9a:4c:08:fd:c6 em0: netmap queues/slots: TX 1/1024, RX 1/1024 acpi_button0: on acpi0 acpi_button1: on acpi0 acpi_tz0: on acpi0 acpi_tz1: on acpi0 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: console (115200,n,8,1) atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] driver bug: Unable to set devclass (class: atkbdc devname: (unknown)) psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Generic PS/2 mouse, device ID 0 orm0: at iomem 0xc0000-0xcffff,0xd0000-0xd0fff,0xd1000-0xd1fff on isa0 ppc0: cannot reserve I/O port range est0: on cpu0 est1: on cpu1 est2: on cpu2 est3: on cpu3 ZFS filesystem version: 5 ZFS storage pool version: features support (5000) Timecounters tick every 1.000 msec ipfw2 (+ipv6) initialized, divert enabled, nat loadable, default to accept, logging disabled DUMMYNET 0 with IPv6 initialized (100409) load_dn_sched dn_sched FIFO loaded load_dn_sched dn_sched FQ_CODEL loaded load_dn_sched dn_sched FQ_PIE loaded load_dn_sched dn_sched PRIO loaded load_dn_sched dn_sched QFQ loaded load_dn_sched dn_sched RR loaded load_dn_sched dn_sched WF2Q+ loaded load_dn_aqm dn_aqm CODEL loaded load_dn_aqm dn_aqm PIE loaded usb_needs_explore_all: no devclass hdacc0: at cad 0 on hdac0 hdaa0: at nid 1 on hdacc0 pcm0: at nid 20,33 on hdaa0 pcm1: at nid 27 on hdaa0 hdacc1: at cad 2 on hdac0 hdaa1: at nid 1 on hdacc1 pcm2: at nid 3 on hdaa1 ses0 at ahciem0 bus 0 scbus4 target 0 lun 0 ses0: SEMB S-E-S 2.00 device ses0: SEMB SES Device cd0 at ahcich1 bus 0 scbus1 target 0 lun 0 cd0: Removable CD-ROM SCSI device cd0: Serial Number M16H4JG4543 cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes= ) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ATA8-ACS SATA 3.x device ada0: Serial Number ZA4292G6 ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 476940MB (976773168 512 byte sectors) ada0: quirks=3D0x1<4K> Trying to mount root from zfs:zroot/ROOT/default []... xl0: link state changed to DOWN xl0: link state changed to UP ppt0 mem 0xf7000000-0xf7001fff irq 18 at device 0.0 on pci4 em0: link state changed to UP Regards, .. Op 25-03-18 om 03:01 schreef Peter Grehan: > >> I surely will try this out, but what about device 4/0/0 showing the >> same issue. Both tests where performed separately showing the exact >> same result, of course I'd be happy if either one of them worked. > > =C2=A0I think what is happening here is that Windows is enabling legacy= > interrupts on the device, and that happens to be on the same shared > IRQ line that the ATA controller is on, resulting in spurious interrupt= s. > > =C2=A0The dmesg for the system may be able to confirm this, since it sh= ould > list the legacy IRQs that have been assigned. > > =C2=A0bhyve PCI passthru relies not only on the device supporting MSI/M= SI-x > interrupts, but the guest using those. > > later, > > Peter. --7b1ReIjPgK8kBpG6FzBHC0HGTFpdCTxRY-- --0CxSYz6WXwKvSgQdEsSKaCPjiJvUk3Jcj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJauJJcAAoJENWumses7+9mwSYQAI9mbCMsVTEIO9VDYAiFoSp0 qD58nBggHEz/d81yjtx2GW0n20vyqmuXRrmAYkeiFN6Zv3f3wpKkfD6f5n0NKren 7YogU2rBGtoRP1TkVSZeAJMhHW+nZVxTfol9x2GpH3jV1AsqeIvz7HntPCFbToTB sQgzYqYdMSxUv5sQztS7MFvcBc72tOE1mGv1YcsrozOUB+Ahuc5bhlTcSt14fbTI vUfOBbJ5s2fIkl6SOAGZtd+JR81RAGGw1fT9YZXRydN4CwTb6AdFtqOcIl/8pnZH EHF9LSDfmrKBT9crVRdR/U+q9vL+0tZhDiU/Z5INkdXYOjYgaB7UcZth3t13pXgs 9KWxx3D0DW3j9qBv0D53kkJJKWiJo0k0zpnX49HTxI9pJFTJJXLYd6Tb5CLgHMMq Nzb4w3qGigPvf9tHJb7VYTv65I39LneewsQWgxz1EYpNxEOmd1BLIDsATwLOf/0i LCHQ93Qa/A2d7jWHugh1B+Usnd6IozgN/DmJhg5moff4KnXAgkKFQklXShLBTYOg s+Iw7GxS6ntvjDxf1Oh7PbRln/cNVqtBZe9AG4sZa+Yf1y0YjmTkxvZhCrpNr26r 8GjmCMZublnHczDhrU83SVGlIscZjNhYzHCeyM+/uQ1S1sIHYVWcvOuQBaPpDauT soi6MZpUvzkwQg2zJSU9 =cNyq -----END PGP SIGNATURE----- --0CxSYz6WXwKvSgQdEsSKaCPjiJvUk3Jcj--