Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Mar 2018 08:25:32 +0200
From:      Wouter Snels <nospam@ofloo.net>
To:        Peter Grehan <grehan@freebsd.org>, freebsd-virtualization@freebsd.org
Subject:   Re: bhyve pci passthrough usb controller
Message-ID:  <57744ffe-605a-bce5-7d70-864e9ac9c560@ofloo.net>
In-Reply-To: <48cef2a2-f8de-1784-9094-daeb2dd7d55a@freebsd.org>
References:  <201803240230.w2O2U21F033917@pdx.rh.CN85.dnsmgr.net> <bfda0fa1-48be-4bc5-9172-8de89e4196fc@ofloo.net> <48cef2a2-f8de-1784-9094-daeb2dd7d55a@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--0CxSYz6WXwKvSgQdEsSKaCPjiJvUk3Jcj
Content-Type: multipart/mixed; boundary="7b1ReIjPgK8kBpG6FzBHC0HGTFpdCTxRY";
 protected-headers="v1"
From: Wouter Snels <nospam@ofloo.net>
To: Peter Grehan <grehan@freebsd.org>, 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>
 <bfda0fa1-48be-4bc5-9172-8de89e4196fc@ofloo.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: <serial bus, USB> at device 20.0 (no driver attached)
pci4: <serial bus, USB> 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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PG=
E,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
=C2=A0
Features2=3D0x7ffafbff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,S=
SSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDL=
T,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
=C2=A0 AMD Features=3D0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
=C2=A0 AMD Features2=3D0x121<LAHF,ABM,Prefetch>
=C2=A0 Structured Extended
Features=3D0x29c6fbf<FSGSBASE,TSCADJ,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INV=
PCID,RTM,NFPUSG,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PROCTRACE>
=C2=A0 Structured Extended Features3=3D0xc000000<IBPB,STIBP>
=C2=A0 XSAVE Features=3D0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
=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: <DELL=C2=A0=C2=A0 CBX3=C2=A0=C2=A0 >
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
random: unblocking device.
ioapic0 <Version 2.0> 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: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <DELL CBX3=C2=A0=C2=A0 > on motherboard
acpi0: Power Button (fixed)
unknown: memory range not supported
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
hpet0: <High Precision Event Timer> 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: <AT realtime clock> 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: <AT timer> 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: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pcib0: _OSC returned error 0x4
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xf000-0xf03f mem
0xf6000000-0xf6ffffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0
vgapci0: Boot video device
pci0: <serial bus, USB> at device 20.0 (no driver attached)
pci0: <simple comms> at device 22.0 (no driver attached)
ahci0: <Intel Sunrise Point AHCI SATA controller> 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: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
ahciem0: <AHCI enclosure management bridge> on ahci0
pcib2: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> at device 0.0 on pci2
pci3: <ACPI PCI bus> on pcib3
xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xe000-0xe07f mem
0xf7120000-0xf712007f irq 16 at device 0.0 on pci3
miibus0: <MII bus> on xl0
bmtphy0: <Broadcom 3c905B internal PHY> 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: <ACPI PCI-PCI bridge> irq 18 at device 28.6 on pci0
pci4: <ACPI PCI bus> on pcib4
pci4: <serial bus, USB> at device 0.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
pci0: <memory> at device 31.2 (no driver attached)
hdac0: <Intel Sunrise Point HDA Controller> mem
0xf7240000-0xf7243fff,0xf7220000-0xf722ffff irq 16 at device 31.3 on pci0=

em0: <Intel(R) PRO/1000 Network Connection 7.6.1-k> 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: <Sleep Button> on acpi0
acpi_button1: <Power Button> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz1: <Thermal Zone> on acpi0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: console (115200,n,8,1)
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
driver bug: Unable to set devclass (class: atkbdc devname: (unknown))
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Generic PS/2 mouse, device ID 0
orm0: <ISA Option ROMs> at iomem
0xc0000-0xcffff,0xd0000-0xd0fff,0xd1000-0xd1fff on isa0
ppc0: cannot reserve I/O port range
est0: <Enhanced SpeedStep Frequency Control> on cpu0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
est2: <Enhanced SpeedStep Frequency Control> on cpu2
est3: <Enhanced SpeedStep Frequency Control> 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: <Realtek ALC255 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC255 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC255 (Analog 2.0+HP)> at nid 20,33 on hdaa0
pcm1: <Realtek ALC255 (Rear Analog Line-out)> at nid 27 on hdaa0
hdacc1: <Intel Skylake HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel Skylake Audio Function Group> at nid 1 on hdacc1
pcm2: <Intel Skylake (HDMI/DP 8ch)> at nid 3 on hdaa1
ses0 at ahciem0 bus 0 scbus4 target 0 lun 0
ses0: <AHCI SGPIO Enclosure 1.00 0001> SEMB S-E-S 2.00 device
ses0: SEMB SES Device
cd0 at ahcich1 bus 0 scbus1 target 0 lun 0
cd0: <HL-DT-ST DVD+-RW GU90N A1C1> 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: <ST500DM002-1SB10A CC43> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?57744ffe-605a-bce5-7d70-864e9ac9c560>