From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2] Shared memory device with interrupt support Date: Mon, 18 May 2009 00:39:25 +0300 Message-ID: <4A10840D.4040506@redhat.com> References: <3D9CB4061D1EB3408D4A0B910433453C030BCA8891@inbmail01.lsi.com> <16B549C6-1DCE-459E-AC02-CBC122097A2C@cs.ualberta.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Kumar, Venkat" , "kvm@vger.kernel.org" To: Cam Macdonell Return-path: Received: from mx2.redhat.com ([66.187.237.31]:37914 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754479AbZEQVjX (ORCPT ); Sun, 17 May 2009 17:39:23 -0400 In-Reply-To: <16B549C6-1DCE-459E-AC02-CBC122097A2C@cs.ualberta.ca> Sender: kvm-owner@vger.kernel.org List-ID: Cam Macdonell wrote: > > I don't think so. With the mmap call, I specify MAP_FIXED which > requires that the memory in the shared memory object be mapped to the > address given in the first parameter (s->ivshmem_ptr). If MAP_FIXED > is not specified then mmap would allocate the memory and map on to it, > but with MAP_FIXED it maps onto the already reserved space that > ivshmem_ptr points to and was allocated with qemu_ram_alloc(). It might be nice to have a variant of qemu_ram_alloc() that takes a pointer to existing memory, so we don't have to play these MAP_FIXED games. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.