From mboxrd@z Thu Jan 1 00:00:00 1970
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38773)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from
) id 1ZkWHD-00070y-Qu
for qemu-devel@nongnu.org; Fri, 09 Oct 2015 07:55:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1ZkWH9-0006qI-Pi
for qemu-devel@nongnu.org; Fri, 09 Oct 2015 07:55:55 -0400
Received: from mailout1.w1.samsung.com ([210.118.77.11]:46659)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1ZkWH9-0006oM-Io
for qemu-devel@nongnu.org; Fri, 09 Oct 2015 07:55:51 -0400
Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244])
by mailout1.w1.samsung.com
(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5
2014)) with ESMTP id <0NVY00GRCBSZ6N30@mailout1.w1.samsung.com> for
qemu-devel@nongnu.org; Fri, 09 Oct 2015 12:55:47 +0100 (BST)
From: Pavel Fedin
References: <1444159184-18153-1-git-send-email-marcandre.lureau@redhat.com>
In-reply-to: <1444159184-18153-1-git-send-email-marcandre.lureau@redhat.com>
Date: Fri, 09 Oct 2015 14:55:46 +0300
Message-id: <015601d10289$6f487650$4dd962f0$@samsung.com>
MIME-version: 1.0
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: quoted-printable
Content-language: ru
Subject: Re: [Qemu-devel] [PULL 00/48] ivshmem series
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: marcandre.lureau@redhat.com, peter.maydell@linaro.org
Cc: qemu-devel@nongnu.org
Hello!
I have merged this PULL into our local repository and my colleague gave =
it a try.
It seems to work, but looks like ivshmem + memdev + hugetlbfs doesn't =
do the right thing. Memdev does attach itself to a hugetlb, but we =
cannot actually share data with it.
Our command line was:
--- cut ---
/usr/local/bin/qemu-system-aarch64 \
-name ivshmem1_huge \
-machine virt,accel=3Dkvm,usb=3Doff,gic-version=3D3 \
-cpu host -m 2048 \
-realtime mlock=3Doff \
-smp 8,sockets=3D8,cores=3D1,threads=3D1 \
-nographic \
-kernel /var/lib/libvirt/images/Image_uio \
-append console=3D'ttyAMA0,115200n8 root=3D/dev/sda4 rootwait =
hugepages=3D128 earlycon=3Dpl011,0x9000000' \
-device i82801b11-bridge,id=3Dpci.1,bus=3Dpcie.0,addr=3D0x1 \
-device =
pci-bridge,chassis_nr=3D2,id=3Dpci.2,bus=3Dpci.1,addr=3D0x1 \
-device virtio-scsi-pci,id=3Dscsi0,bus=3Dpci.2,addr=3D0x1 \
-drive =
file=3D/var/lib/libvirt/images/sda3_pool/ivshmem1_huge.qcow2,if=3Dnone,id=
=3Ddrive-scsi0-0-0-0,format=3Dqcow2 \
-device =
scsi-hd,bus=3Dscsi0.0,channel=3D0,scsi-id=3D0,lun=3D0,drive=3Ddrive-scsi0=
-0-0-0,id=3Dscsi0-0-0-0,bootindex=3D1 \
-object =
memory-backend-file,size=3D4G,mem-path=3D/dev/huge,id=3Dmb1,share=3Don \
-device ivshmem,memdev=3Dmb1 \
-msg timestamp=3Don
--- cut ---
The problem is that memdev creates a file as temporary, and then =
immediately unlinks it. Therefore, we cannot feed the same file to =
another VM. These are open files, used by two running VMs, which are =
supposed to exchange data via ivshmem.
--- cut ---
[root@thunderx-2 igor]# ls -l /proc/34845/fd
total 0
lrwx------ 1 root root 64 Oct 9 06:59 0 -> /dev/pts/2
lrwx------ 1 root root 64 Oct 9 06:59 1 -> /dev/pts/2
...
lrwx------ 1 root root 64 Oct 9 06:59 7 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Oct 9 06:59 8 -> =
/dev/huge/qemu_back_mem._objects_mb1.lwEeDc (deleted)
lrwx------ 1 root root 64 Oct 9 06:59 9 -> /dev/kvm
[root@thunderx-2 igor]# ls -l /proc/34866/fd
total 0
lrwx------ 1 root root 64 Oct 9 06:59 0 -> /dev/pts/0
lrwx------ 1 root root 64 Oct 9 06:59 1 -> /dev/pts/0
...
lrwx------ 1 root root 64 Oct 9 06:59 7 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Oct 9 06:59 8 -> =
/dev/huge/qemu_back_mem._objects_mb1.0Myp8M (deleted)
lrwx------ 1 root root 64 Oct 9 06:59 9 -> /dev/kvm
--- cut ---
Due to the same reason, we cannot also exchange data between host and =
VM.
Is it a flaw or do we just do something wrong?
Tested-by: Igor Skalkin
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia