From: Eric Blake <eblake@redhat.com>
To: "Michael R. Hines" <mrhines@linux.vnet.ibm.com>
Cc: quintela@redhat.com, qemu-devel@nongnu.org, owasserm@redhat.com,
onom@us.ibm.com, abali@us.ibm.com, mrhines@us.ibm.com,
gokul@us.ibm.com, pbonzini@redhat.com, chegu_vinod@hp.com
Subject: Re: [Qemu-devel] [PATCH v3 for-1.7] rdma: rename 'x-rdma' => 'rdma'
Date: Fri, 15 Nov 2013 12:49:14 -0700 [thread overview]
Message-ID: <52867ABA.6000602@redhat.com> (raw)
In-Reply-To: <52867985.2070605@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2155 bytes --]
On 11/15/2013 12:44 PM, Michael R. Hines wrote:
> On 11/15/2013 02:25 PM, Eric Blake wrote:
>> On 11/15/2013 10:40 AM, Michael R. Hines wrote:
>>> This is unrelated to RDMA - accessing the /dev/infiniband
>>> device nodes is already supported by libvirt my modifying
>>> the configuration file in /etc and that works just fine.
>> http://wiki.qemu.org/Features/RDMALiveMigration states that you modify
>> the .conf file to expose /dev/infiniband/rdma_cm and friends. Are all
>> of these devices read/write accessible to non-root? Or is there going
>> to be a problem if using user="qemu" group="qemu"? (That is, merely
>> exposing the devices through cgroup device ACL checking may be
>> insufficient if you can't access the devices when not running root/root).
>
> Yes, non-root access is working just fine. Keep in mind that QEMU is no
> different than any other standard HPC application (like MPI programs)
> which perform RDMA operations.
>
> QEMU is simply another librdmacm/libibverbs user and it does
> not require any special privileges to the device files.
>
>> Libvirt can be patched so that the .conf file does not have to be edited
>> (ie. change the defaults so that if cgroup_device_acl is not present in
>> the conf file, the defaults could still let a domainaccess the
>> /dev/infiniband devices).
>>
>
> That would be quite nice! Shall I include that in the next version
> of my libvirt patch?
Yes, if you can.
[rest of this is more for the libvirt list]
Ideally, the access should only be granted at the start of the
migration, and then revoked when no longer needed. For an example of
granting ACL access while a domain is running, see how
qemuDomainPrepareDiskChainElement() calls qemuSetupDiskCgroup and
qemuTeardownDiskCgroup at appropriate times to alter the cgroup settings
on the fly. These functions in turn call into virCgroupAllowDevicePath,
and follow it up with an audit log, to make it easy to track through the
audit which devices have been exposed to a guest.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-11-15 19:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 18:59 [Qemu-devel] [PATCH v3 for-1.7] rdma: rename 'x-rdma' => 'rdma' mrhines
2013-11-06 19:04 ` Eric Blake
2013-11-15 17:06 ` Daniel P. Berrange
2013-11-15 17:40 ` Michael R. Hines
2013-11-15 19:25 ` Eric Blake
2013-11-15 19:44 ` Michael R. Hines
2013-11-15 19:49 ` Eric Blake [this message]
2013-11-16 10:32 ` Daniel P. Berrange
2013-11-22 16:50 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52867ABA.6000602@redhat.com \
--to=eblake@redhat.com \
--cc=abali@us.ibm.com \
--cc=chegu_vinod@hp.com \
--cc=gokul@us.ibm.com \
--cc=mrhines@linux.vnet.ibm.com \
--cc=mrhines@us.ibm.com \
--cc=onom@us.ibm.com \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).