Am Fri, 8 Feb 2019 21:26:29 -0800 schrieb <[email protected]>:
> On Friday, February 8, 2019 at 8:40:18 AM UTC-7, Henning Schild wrote: > > Am Thu, 7 Feb 2019 16:53:41 -0800 > > schrieb <[email protected]>: > > > > > On Wednesday, February 6, 2019 at 5:59:09 AM UTC-7, Henning Schild > > > wrote: > > > > Am Tue, 5 Feb 2019 19:25:28 -0800 > > > > schrieb <[email protected]>: > > > > > > > > > On Friday, February 1, 2019 at 12:32:40 AM UTC-7, J. Kiszka > > > > > wrote: > > > > > > You likely want > > > > > > https://github.com/siemens/linux/commits/jailhouse-enabling/4.14 > > > > > > or the 4.19-variant that is jailhouse-prepared. That's what > > > > > > jailhouse-images is building for you. If you just rebuild > > > > > > the kernel that the original image was using, only adding > > > > > > UIO, you should be fine with keeping the jailhouse kernel > > > > > > package untouched. But the cleanest way is reproducing the > > > > > > image via jailhouse-images after adjusting the parameter > > > > > > you want to change (CONFIG_UIO, ROOTFS_EXTRA etc.). > > > > > > > > > > > > Jan > > > > > > > > > > > > -- > > > > > > Siemens AG, Corporate Technology, CT RDA IOT SES-DE > > > > > > Corporate Competence Center Embedded Linux > > > > > > > > > > That worked! I was able to figure out the correct kernel to > > > > > build by looking at > > > > > jailhouse-images/recipes-kernel/linux/linux-jailhouse.bb from > > > > > when I last generated my image at 4.14.73 > > > > > (https://github.com/siemens/linux/archive/1dd68658b3a8308a160b0786fc4e1e04d8ff5216.tar.gz). > > > > > With that, I supplied QEMU with the new UIO-enabled kernel > > > > > image and built jailhouse and uio_ivshmem.ko and ran the > > > > > ivshmem jailhouse demo. > > > > > > > > > > However, I'm still not sure how to read in the data from the > > > > > ivshmem-demo. Once I insmod uio_ivshmem.ko, shouldn't there > > > > > be a device called /dev/uio0 that I can read "Hello From > > > > > IVSHMEM" from and write back to? And shouldn't there be an > > > > > entry in /sys/class/uio/? I don't see either of these, and > > > > > I'm not quite sure how to debug this yet. > > > > > > > > Yes you should get that. If you do not, my first guess would be > > > > that you are not building the jailhouse branch of the > > > > guest-code repo. The jailhouse version of the PCI interface is > > > > slightly different, so the probing between the two is not > > > > compatible. > > > Shouldn't I see /dev/uio0 and /sys/class/uio/ once I `insmod` it, > > > regardless if it's built against a non-jailhouse-enabled kernel? > > > Or will it show up once jailhouse is running? > > > > I am not actually sure what will happen, so if a /dev/uio0 will pop > > up even if probing failed. > > Just to clarify, i did not talk about a jailhouse enabled kernel, i > > talked about checking out the jailhouse branch of the repo you got > > the uio driver from. The one from branch "master" will not work! > > Thanks! That's just what I needed. I didn't realize that there was a > jailhouse branch. I rebuilt it, /dev/uio0 shows up, and the > ivshmem-demo is working! uio_read and shmem_test.py > (README.jailhouse) both work great. > > But unfortunately uio_send doesn't. When I run `uio_send /dev/uio0 1 > 0 0`, it fails to mmap() with an ENODEV/"No such device" error. The > mmap man page says "the underlying filesystem of the specified file > does not support memory mapping." > > Do you know why this is? Isn't uio_send just trying to mmap() the PCI > config space (the first 256 bytes)? Sorry no clue. I guess you should follow that error to the condition triggering it. A first guess would be that you need to mmap the full page ... change the value to 4096. Only the first 256 bytes are of interest but 4k is the lowest mapping granularity. And check whether your user has write permissions to the file, maybe try as root first. Henning > Thanks, > -Michael > > > > > Henning > > > > > When I `make` uio_ivshmem, it shows that it's entering the correct > > > kernel source. Is > > > https://github.com/siemens/linux/commit/1dd68658b not the correct > > > jailhouse-enabled source to build for 4.14.73? > > > > > > Does making all the UIO modules be built-in (Y) instead of (M) > > > make any difference? I set them to Y because I thought it would > > > make things easier. > > > > > > I may consider upgrading jailhouse images to the latest if I can't > > > get things working. > > > > > > Thanks, > > > Michael > > > > > > > > Henning > > > > > > > > > The only documentation I can find on this is > > > > > https://www.kernel.org/doc/html/v4.18/driver-api/uio-howto.html. > > > > > > > > > > Any help is appreciated. Sorry to be a bother. 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.
