From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB4lH-0003u9-3I for qemu-devel@nongnu.org; Wed, 05 Feb 2014 10:51:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WB4lA-0004hC-Tl for qemu-devel@nongnu.org; Wed, 05 Feb 2014 10:51:39 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:30882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB4lA-0004gq-Np for qemu-devel@nongnu.org; Wed, 05 Feb 2014 10:51:32 -0500 Message-ID: <52F25DE4.8000503@inria.fr> Date: Wed, 05 Feb 2014 16:51:00 +0100 From: Vincent KHERBACHE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Get a vm fd using kvm API's ioctls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi all, I'm trying to get the dirty bitmap of a specific VM, using KVM_GET_DIRTY_LOG ioctl. For this purpose, I should be able to get the file descriptor of an existing VM by doing something like : kvm_fd = open("/dev/kvm") ... b = ioctl(KVM_GET_DIRTY_LOG, vm_fd) I also can see, from the API documentation (https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt), that there is the following restriction concerning VM ioctls : "Only run VM ioctls from the same process (address space) that was used to create the VM." Is there a way to get the fd of a running VM (created from an other process), or maybe a better/easier manner to get the dirty bitmap ? Any help would be welcome. Thanks, -- Vincent KHERBACHE PhD student at INRIA Sophia Antipolis (FRANCE)