From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZphiZ-0000CY-Se for qemu-devel@nongnu.org; Fri, 23 Oct 2015 15:09:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZphiU-0002sf-T8 for qemu-devel@nongnu.org; Fri, 23 Oct 2015 15:09:35 -0400 Received: from smtp.aimale.com ([166.78.138.199]:48701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZphiU-0002bM-M4 for qemu-devel@nongnu.org; Fri, 23 Oct 2015 15:09:30 -0400 References: <1444952643-5033-1-git-send-email-valerio@aimale.com> <87h9lrkz56.fsf@blackfin.pond.sub.org> <56210A17.6080401@aimale.com> <87io63xpke.fsf@blackfin.pond.sub.org> <56250035.40805@aimale.com> <87twpkqyow.fsf@blackfin.pond.sub.org> <20151022191203.GC3736@thinpad.lan.raisama.net> <56293F99.1060109@aimale.com> <20151022214719.GD3736@thinpad.lan.raisama.net> <56295A60.1040901@aimale.com> <20151023185504.GI3736@thinpad.lan.raisama.net> From: Valerio Aimale Message-ID: <562A85C9.6050309@aimale.com> Date: Fri, 23 Oct 2015 13:08:57 -0600 MIME-Version: 1.0 In-Reply-To: <20151023185504.GI3736@thinpad.lan.raisama.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: lcapitulino@redhat.com, Markus Armbruster , qemu-devel@nongnu.org On 10/23/15 12:55 PM, Eduardo Habkost wrote: > On Thu, Oct 22, 2015 at 03:51:28PM -0600, Valerio Aimale wrote: >> On 10/22/15 3:47 PM, Eduardo Habkost wrote: >>> On Thu, Oct 22, 2015 at 01:57:13PM -0600, Valerio Aimale wrote: >>>> On 10/22/15 1:12 PM, Eduardo Habkost wrote: >>>>> On Wed, Oct 21, 2015 at 12:54:23PM +0200, Markus Armbruster wrote: >>>>>> Valerio Aimale writes: >>>>> [...] >>>>>>> There's also a similar patch, floating around the internet, the uses >>>>>>> shared memory, instead of sockets, as inter-process communication >>>>>>> between libvmi and QEMU. I've never used that. >>>>>> By the time you built a working IPC mechanism on top of shared memory, >>>>>> you're often no better off than with AF_LOCAL sockets. >>>>>> >>>>>> Crazy idea: can we allocate guest memory in a way that support sharing >>>>>> it with another process? Eduardo, can -mem-path do such wild things? >>>>> It can't today, but just because it creates a temporary file inside >>>>> mem-path and unlinks it immediately after opening a file descriptor. We >>>>> could make memory-backend-file also accept a full filename as argument, >>>>> or add a mechanism to let QEMU send the open file descriptor to a QMP >>>>> client. >>>>> >>>> Eduardo, would my "artisanal" idea of creating an mmap'ed image of the guest >>>> memory footprint work, augmented by Eric's suggestion of having the qmp >>>> client pass the filename? >>> The code below doesn't make sense to me. >> Ok. What I am trying to do is to create a mmapped() memory area of the guest >> physical memory that can be shared between QEMU and an external process, >> such that the external process can read arbitrary locations of the qemu >> guest physical memory. >> In short, I'm using mmap MAP_SHARED to share the guest memory area with a >> process that is external to QEMU >> >> does it make better sense now? > I think you are confused about what mmap() does. It will create a new > mapping into the process address space, containing the data from an > existing file, not the other way around. > Eduardo, I think it would be a common rule of politeness not to pass any judgement on a person that you don't know, but for some texts in a mailing list. I think I understand how mmap() works, and very well. Participating is this discussion has been a struggle for me. For the good of the libvmi users, I have been trying to ignore the judgements, the comments and so on. But, alas, I throw my hands up in the air, and I surrender. I think libvmi can live, as it has for the past years, by patching the QEMU source tree on as needed basis, and keeping the patch in the libvmi source tree, without disturbing any further the QEMU community.