Am Thu, 7 Feb 2019 22:11:45 -0800
schrieb <[email protected]>:

> Hello,
> 
> So I've been debugging uio_ivshmem.c with print statements, and I
> think have a theory for what's going wrong:
> 
> I believe the ivshem-net driver is being attached to the root cell's
> ivshmem PCI device before the uio_ivshmem driver can, since I
> compiled the kernel with CONFIG_IVSHMEM_NET=Y.
> 
> It appears that uio_ivshmem is not successfully completing the UIO
> probe stage, because it's probing PCI device `f` (ivshmem-demo's
> ivshmem device) instead of PCI device `e` (the root cell's ivshmem
> device). uio_ivshmem never probes device `e` because it's already
> taken by ivshmem-net. So uio_ivshmem appears to find the next
> available ivshmem device, which is `f`. But since it's not allowed
> access (maybe?), the driver fails and doesn't set up properly.

In addition to the vendor and device id we have a protocol defined.
ivshmem-net will only bind to JAILHOUSE_SHMEM_PROTO_VETH while the
ivshmem-demo will only bind to JAILHOUSE_SHMEM_PROTO_UNDEFINED. The uio
driver does not check that, but obviously should not be used on
PROTO_VETH devices.
That means all the ones that are claimed by ivshmem-net would not work
anyways, so there is no conflict and no unbinding needed. Even if you
bound the uio driver on one device, the other side "ivshmem-demo" would
refuse to do the same.

My theory is still that you are on the wrong branch for the uio driver.

Henning

> Even when I manually unbind ivshmem-net from device `e`, whenever I
> start jailhouse, it seems to automatically rebind. So I guess that
> means that I'll need to rebuild the kernel with CONFIG_IVSHMEM_NET=N
> to allow uio_ivshmem a chance to bind to `e`.
> 
> I'm still investigating, but wanted to see if I'm on the right track
> here.
> 
> Thanks,
> Michael
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to