qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] How to access to ivshmem device in VM ?


From: Marc-André Lureau
Subject: Re: [Qemu-devel] How to access to ivshmem device in VM ?
Date: Fri, 17 Feb 2017 08:45:06 +0000

Hi

On Thu, Feb 16, 2017 at 12:02 AM Sébastien Frémal <
address@hidden> wrote:

> Hello !
>
> I searched for a forum or a place where questions about QEMU can be asked,
> but I found nothing except mailing lists. If there is a more appropriate
> place for my question, do not hesitate to indicate it to me !!
>
> So, I'm trying to use ivshmem to share memory pages between several VM. I
> found many webpages documenting the set up of this device. I successfully
> installed the mechanism in the host. I launched ivshmem-clients which
> successfully connected to the server. The problem is that I can't
> understand how to access to the shared memory pages in a VM. I launched my
> VM with this command line :
> sudo qemu-system-x86_64 -show-cursor -enable-kvm -drive
> format=raw,file=/var/lib/libvirt/images/theRise.img -m 4096 -machine q35
> -show-cursor -device ivshmem-doorbell,vectors=4,chardev=ivshmem -chardev
> socket,path=/tmp/ivshmem_socket,id=ivshmem
> (the server was launched with : sudo ivshmem-server -p
> /var/run/ivshmem-server.pid -S /tmp/ivshmem_socket -M ivshmem -l 4K -n 4).
>
> The VM executes properly (I just don't have a visible mouse cursor despite
> the "-show-cursor" option, but it could be worse) but I have absolutely no
> idea on how to access the ivshmem device. I firstly thought that the option
> would add a new device in /dev but there is nothing special. I ran an
>

There is no guest driver for ivshmem, it's left deliberately open for any
usage.


> updatedb/locate ivshmem to check if there was something interesting on the
> machine, but there is no results. I don't know which socket path I must
> give to my ivshmem client in my VM so it can connect to my server. I
>

You give the socket path of the server, in your example /tmp/ivshmem_socket
is fine.


> searched for this particular information on the web, but I found nothing.
>
> Did you read http://nairobi-embedded.org/linux_pci_device_driver.html ?

Can someone indicate me how to connect to the ivshmem-server from a VM
> please ?
>
>
Your example should work.

Note that ivshmem is not well regarded by the qemu community, what are you
trying to accomplish?

cheers
-- 
Marc-André Lureau


reply via email to

[Prev in Thread] Current Thread [Next in Thread]