Hello,

On Sat, Aug 14, 2021 at 8:20 PM Jan Kiszka <[email protected]> wrote:
>
> On 11.08.21 20:36, Anmol wrote:
>
> The echo should not show any response, but when you do an lspci -k, you
> should see that the targeting devices are now driven by uio_ivshmem. If
> not, the IDs might not be correct yet, or the devices are missing.
>
> Also check the kernel console of the cell where you issued this echo.
>

I have added the PCI devices to both the cells and set the
`.shmem_dev_id` accordingly, please have a look at the cell config.
files I have sent.

here's the `lspci -k` output:
qemux86-64:~# lspci -k
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
Subsystem: Red Hat, Inc. QEMU Virtual Machine
00:01.0 VGA compatible controller: Red Hat, Inc. Virtio GPU (rev 01)
Subsystem: Red Hat, Inc. Virtio GPU
Kernel driver in use: virtio-pci
00:02.0 Ethernet controller: Red Hat, Inc. Virtio network device
Subsystem: Red Hat, Inc. Virtio network device
Kernel driver in use: virtio-pci
00:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio RNG
Subsystem: Red Hat, Inc. Virtio RNG
Kernel driver in use: virtio-pci
00:04.0 SCSI storage controller: Red Hat, Inc. Virtio block device
Subsystem: Red Hat, Inc. Virtio block device
Kernel driver in use: virtio-pci
00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6
Family) High Definition Audio Controller (rev 01)
Subsystem: Red Hat, Inc. QEMU Virtual Machine
Kernel driver in use: snd_hda_intel
00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB
UHCI Controller #1 (rev 03)
Subsystem: Red Hat, Inc. QEMU Virtual Machine
Kernel driver in use: uhci_hcd
00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB
UHCI Controller #2 (rev 03)
Subsystem: Red Hat, Inc. QEMU Virtual Machine
Kernel driver in use: uhci_hcd
00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB
UHCI Controller #3 (rev 03)
Subsystem: Red Hat, Inc. QEMU Virtual Machine
Kernel driver in use: uhci_hcd
00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2
EHCI Controller #1 (rev 03)
Subsystem: Red Hat, Inc. QEMU Virtual Machine
Kernel driver in use: ehci-pci
00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface
Controller (rev 02)
Subsystem: Red Hat, Inc. QEMU Virtual Machine
00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH)
6 port SATA Controller [AHCI mode] (rev 02)
Subsystem: Red Hat, Inc. QEMU Virtual Machine
Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
Subsystem: Red Hat, Inc. QEMU Virtual Machine
Kernel driver in use: i801_smbus


> >
> > - In this command `$ virtio-ivshmem-block /dev/uio0
> > /path/to/disk.image`, I am not able to load the `virtio-ivshmem-block`
> > module, and is the `disc.image` a standard `LinuxInstallation.img`?
> >
>
> What do you mean with "load the `virtio-ivshmem-block` module"? The tool
> is no module, it's a plain Linux application you just need to start.
> When you do that, what errors do you get?
>

Yes, `virtio-ivshmem-block` can be built in the `tools/virtio`, but
when I am trying this in root cell, it's giving me the below error.

qemux86-64:~# ./virtio-ivshmem-block /dev/uio0 disk.img
-sh: ./virtio-ivshmem-block: No such file or directory

Also, I am not able to see the `/dev/uio0` in the root-cell.

> The disk image needs to be raw image. But its size matters as that
> defines the virtual disk size, but you may even leave it empty and only
> partition or format it from the front-end guest.
>

I am creating disk.image as follows:

$ dd if=/dev/zero of=disk.img bs=1M count=1024
$ mkfs.ext4 disk.img


> > - For `virtio-ivshmem-block`, do I need to compile the
> > `virtio-ivshmem-block.c` externally and copy the module to the QEmulated
> > Image?
>
> You need to have that application inside the guest that is suppose to
> act as back-end, yes. How you make it available to that guest is up to you.
>

I am trying to achieve Root Cell(backend) <--->
Non-Root-Cell(frontend) communication, instead of the VM1(backend)
<---> VM2(frontend).
Also, for the IVSHMEM2 I need to patch my current QEmu, right? so that
I can insert ivshmem `-chardev` and `-device` into my `qemuboot.conf`,
and run the `./ivshmem2-server`?


Also, Please let me know, should the exact procedure be this:

- In the server/local-machine run `./ivshmem2-server`.
- then add `... -chardev socket,path=/tmp/ivshmem_socket,id=ivshmem
-device ivshmem,chardev=ivshmem` to the `qemuboot.conf`.
- then QEmulate/boot the Image with Jailhouse.
- enable root cell.
- `echo "110a 4106 110a 4106 ffc002 ffffff" >
/sys/bus/pci/drivers/uio_ivshmem/new_id`
- `virtio-ivshmem-block /dev/uio0 disk.img`
- boot the linux-non-root cell.


Thanks and Regards,
Anmol




> >
> > - Can we also use the `queues/jailhouse` kernel for this setup instead
> > of `queues/ivshmem2`?
> >
>
> Yes, queues/jailhouse contains all what is in queues/ivshmem2, and more.
>
> Jan

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/CAC%2ByH-YxAb%2BqaCRds7TZHazFXCgLqYwhJTx8W-0bxrmcXpUbBA%40mail.gmail.com.

Reply via email to