Re: Onboard USB controller passthrough

2017-11-12 Thread Rajil Saraswat
On 5 November 2017 at 13:26, Rajil Saraswat  wrote:
> The onboard xHCI controller (C610/X99 series chipset) does support MSI,
>
> # pciconf -l -BbcV xhci0@pci0:0:20:0
> xhci0@pci0:0:20:0:  class=0x0c0330 card=0x72708086 chip=0x8d318086
> rev=0x05 hdr=0x00
> bar   [10] = type Memory, range 64, base 0xc610, size 65536, enabled
> cap 01[70] = powerspec 2  supports D0 D3  current D0
> cap 05[80] = MSI supports 8 messages, 64 bit enabled with 1 message
>
> I will give this a try.
>
>
> Thanks,
>
> Rajil

I passed the xHCI controller to a VM and it worked. The VM can see all
the usb devices. However, I dont have any devices showing up as
connected to the EHCI controller on the host,

# usbconfig list
ugen0.1:  at usbus0, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (0mA)
ugen1.1:  at usbus1, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (0mA)
ugen0.2:  at usbus0, cfg=0 md=HOST
spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2:  at usbus1, cfg=0 md=HOST
spd=HIGH (480Mbps) pwr=SAVE (0mA)


I do have USB-2.0 devices plugged into these onboard controllers. Why
are they being connected to the xHCI controller?
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Onboard USB controller passthrough

2017-11-05 Thread Rajil Saraswat
On 11/05/2017 11:42 AM, Peter Grehan wrote:
>
>  More importantly, EHCI controllers don't support MSI/MSI-x interrupts
> which is currently required for bhyve PCI-passthru.
>
> later,
>
> Peter.

The onboard xHCI controller (C610/X99 series chipset) does support MSI,

# pciconf -l -BbcV xhci0@pci0:0:20:0
xhci0@pci0:0:20:0:  class=0x0c0330 card=0x72708086 chip=0x8d318086
rev=0x05 hdr=0x00
bar   [10] = type Memory, range 64, base 0xc610, size 65536, enabled
cap 01[70] = powerspec 2  supports D0 D3  current D0
cap 05[80] = MSI supports 8 messages, 64 bit enabled with 1 message

I will give this a try.


Thanks,

Rajil


___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Onboard USB controller passthrough

2017-11-05 Thread Peter Grehan

The controllers looks like this

# pciconf -l -BbcV ppt2@pci0:0:26:0
ppt2@pci0:0:26:0:   class=0x0c0320 card=0x72708086 chip=0x8d2d8086
rev=0x05 hdr=0x00
 bar   [10] = type Memory, range 32, base 0xc6134000, size 1024, enabled




 cap 01[50] = powerspec 2  supports D0 D3  current D0
 cap 0a[58] = EHCI Debug Port at offset 0xa0 in map 0x14
 cap 13[98] = PCI Advanced Features: FLR TP


 More importantly, EHCI controllers don't support MSI/MSI-x interrupts 
which is currently required for bhyve PCI-passthru.


later,

Peter.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Onboard USB controller passthrough

2017-11-05 Thread Rodney W. Grimes
> Hello,
> 
> I have an Supermicro X10DRi-T motherboard which has 2 EHCI controllers
> and 1 xHCI controller. I want to pass one of the EHCI controller to the
> VM running Ubuntu. Unfortunately, the VM immediately quits when i pass
> the USB controller. I am using vm-bhye to manage the VM's running on
> FreeBSD 11.1.
> 
> The controllers looks like this
> 
> # pciconf -l -BbcV ppt2@pci0:0:26:0
> ppt2@pci0:0:26:0:   class=0x0c0320 card=0x72708086 chip=0x8d2d8086
> rev=0x05 hdr=0x00
> bar   [10] = type Memory, range 32, base 0xc6134000, size 1024, enabled
   

> cap 01[50] = powerspec 2  supports D0 D3  current D0
> cap 0a[58] = EHCI Debug Port at offset 0xa0 in map 0x14
> cap 13[98] = PCI Advanced Features: FLR TP
> 
> Any idea how to fix this?

Do you get an error about a BAR that is not page sized, or not
paged aligned?

At this time the bhyve passthrough code can only deal with
things that are page sized and paged aligned.  The above
device has a 1k memory region, that is only a 1/4 page.

I do not know if there is any way to "fix" this, as it
is a limitation of the IOMMU hardware.


-- 
Rod Grimes rgri...@freebsd.org
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"