Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1126991

Summary: [libvirt] expose ivshmem
Product: Red Hat Enterprise Linux 7 Reporter: Stephen Gordon <sgordon>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.0CC: bsarathy, chrisw, david.marchand, drjones, dyuan, gene, hhuang, honzhang, jmiao, juzhang, kdube, linville, maxime.leroy, michen, mkletzan, rbalakri, samuel.gauthier, sgordon, sluo, tatsu-ab1, vincent.jardin, virt-bugs, virt-maint, xfu
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.2.8-5.el7 Doc Type: Enhancement
Doc Text:
Feature: Inter-VM SHared Memory (ivshmem) Reason: adding this feature made it available for users and management tools to specify new shared memory device that implements a PCI BAR with memory shared between VMs and the host for e.g. zero-copy. Result: Adding this feature enabled the VMs to be used for deployments in DPDK project's scenarios.
Story Points: ---
Clone Of: 1088332 Environment:
Last Closed: 2015-03-05 07:41:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1088332, 1104063, 1111101, 1136727    
Bug Blocks: 1082754, 1088337, 1110708    
Attachments:
Description Flags
patch for libvirt 1.2.8-16.el7_1.1
none
patch for libvirt 1.2.8-16.el7_1.1
none
patch for libvirt 1.2.8-16.el7_1.1
none
patch for libvirt 1.2.8-16.el7_1.1 none

Comment 1 Stephen Gordon 2014-08-05 19:27:32 UTC
We would like also to expose IVSHMEM from Libvirt to support the MEMNIC use case (at least) 6wind are working on this support upstream:

    https://www.redhat.com/archives/libvir-list/2014-July/msg01394.html

Comment 2 Vincent JARDIN 2014-08-05 20:20:38 UTC
Thanks Steve.

Latest update from Maxime (cannot be cc'd yet of this PR):
  https://www.redhat.com/archives/libvir-list/2014-August/msg00129.html

Comment 4 Martin Kletzander 2014-10-03 20:49:56 UTC
Fixed upstream (without server support) with commits v1.2.9-33-g540a84e -- v1.2.9-35-gb90a9a6:

commit b90a9a637490acd7f35c6dc52d6e55b5a1054f34
Author: Martin Kletzander <mkletzan>
Date:   Thu Sep 25 09:00:47 2014 +0200

    qemu: Build command line for ivshmem device

commit e3d478eb51c1a60a2f52392a81031b477098e2bc
Author: Maxime Leroy <maxime.leroy>
Date:   Fri Aug 22 12:47:02 2014 +0200

    qemu: add capability probing for ivshmem device

commit 540a84ec89c1634d5e17ba7b8d96049c960bb1b4
Author: Martin Kletzander <mkletzan>
Date:   Mon Sep 22 10:49:39 2014 +0200

    docs, conf, schema: add support for shmem device

Comment 8 Vincent JARDIN 2014-11-10 09:21:30 UTC
I cannot read the bug 1111101

Comment 11 Jincheng Miao 2014-11-11 06:44:36 UTC
(In reply to Vincent JARDIN from comment #8)
> I cannot read the bug 1111101

Sorry, that's my mistake. please ignore it, thanks.

Comment 12 Jincheng Miao 2014-12-11 09:48:03 UTC
In libvirt-1.2.8-9.el7.x86_64, ivshmem could be configured without ivshmem-server:

# rpm -q libvirt qemu-kvm-rhev
libvirt-1.2.8-9.el7.x86_64
qemu-kvm-rhev-2.1.2-13.el7.x86_64

1. add shmem device to domain xml and start it
# virsh edit r7a
<domain type='kvm'>
  <name>r7a</name>
...
  <devices>
    <shmem name='shmem0'>
      <size unit='M'>4</size>
    </shmem>
  </devices>
</domains>

# virsh start r7a

2. check qemu-kvm cmdline
There is '-device ivshmem,size=4m,shm=shmem0'

3. ivshmem device could be recognized as PCI device in guest
<guest> # lspci
...
00:08.0 RAM memory: Red Hat, Inc Inter-VM shared memory


So change this status to VERIFIED.

Comment 13 Vincent JARDIN 2014-12-11 22:04:35 UTC
Thank you.

Comment 15 errata-xmlrpc 2015-03-05 07:41:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0323.html

Comment 16 Vincent JARDIN 2015-03-06 13:05:50 UTC
Please, did you include all the features from this commit:
  http://libvirt.org/git/?p=libvirt.git;a=commit;h=540a84ec89c1634d5e17ba7b8d96049c960bb1b4

?

Comment 17 Martin Kletzander 2015-03-16 16:17:14 UTC
Yes, all three commits mentioned in comment #4 are included in downstream libvirt.

Comment 18 Vincent JARDIN 2015-03-16 22:19:54 UTC
Created attachment 1002526 [details]
patch for libvirt 1.2.8-16.el7_1.1

libvirt.spec applies the enclosed patch.
Record it for proper understanding.

Comment 19 Vincent JARDIN 2015-03-16 22:20:26 UTC
Created attachment 1002527 [details]
patch for libvirt 1.2.8-16.el7_1.1

libvirt.spec applies the enclosed patch.
Record it for proper understanding.

Comment 20 Vincent JARDIN 2015-03-16 22:21:04 UTC
Created attachment 1002528 [details]
patch for libvirt 1.2.8-16.el7_1.1

libvirt.spec applies the enclosed patch.
Record it for proper understanding.

Comment 21 Vincent JARDIN 2015-03-16 22:21:41 UTC
Created attachment 1002529 [details]
patch for libvirt 1.2.8-16.el7_1.1

libvirt.spec applies the enclosed patch.
Record it for proper understanding.

Comment 22 Vincent JARDIN 2015-08-06 05:52:26 UTC
Track some libvirt updates since we are not tracking it yet:
  https://www.redhat.com/archives/libvir-list/2015-July/msg00926.html
     manage the shmem device source

Audit PR:
  https://bugzilla.redhat.com/show_bug.cgi?id=1218603

Audit RFC:
  https://www.redhat.com/archives/libvir-list/2015-July/msg00496.html

Comment 23 Vincent JARDIN 2015-11-16 22:55:15 UTC
Please, add "NK" to the whiteboard, I cannot edit it!