WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] sharing memory between qemu and domu without grant table

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] sharing memory between qemu and domu without grant tables or vmexits...
From: Keir Fraser <keir@xxxxxxx>
Date: Sun, 17 Oct 2010 09:54:07 +0100
Cc:
Delivery-date: Sun, 17 Oct 2010 01:55:17 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:user-agent:date :subject:from:to:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=o9p9EJAHs6SQarumgH77hBbcwo8AV4pt2gHm51Lc8y8=; b=rbQpneVPsfZWuLLV5HU30u+ZzsppwZT5uAzS3ZKG7akQOBa0NbvH2pgu2Fb2/XwrfR mgrm8JjarcMjpOjjfbykMQHQlKn/o2X83snmjLtyvvnQKH7J26vDPlu8GMyL9YmsJKU2 aSzoM2mWYdetsAlsDEEzwLW+0dklTK/jyXPno=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=OH+4HKfku/CLSealYle2MqKj8c2/Cd5WxX19zKUPHyK4hcVjdrGaBWOirK7KtgcOV7 QHu8kYh3NBzJV8afx34S7tThvrbdpeaR3iCe9Wfph/cxEBQd56cyyGgmHduk02Rjsl3l mtiPhv3Vvyxtn9Ke6osxIdFde7AaYfyXZwFKU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D01B1FE3B@trantor>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acttu/Egb94n0I/5RaamETF7xAIFyAAEiHm1AAF2h7AAATuL8Q==
Thread-topic: [Xen-devel] sharing memory between qemu and domu without grant tables or vmexits...
User-agent: Microsoft-Entourage/12.26.0.100708
On 17/10/2010 09:23, "James Harper" <james.harper@xxxxxxxxxxxxxxxx> wrote:

> I'm still not sure I understand it all... might the following work them:
> 1. Allocate a page of memory in my windows code
> 2. Write the PFN to a known io port (with some sort of interlock so that
> a random io write that hits that port isn't going to do anything bad)
> 3. qemu is called when the io port is triggered and maps the page to its
> own space

Oh yes, that is probably the best way for you to get a page of memory.

> Can qemu map an actual page of domu memory without a grant reference
> (remember, grant table is not set up at this point)? Or do I need to map
> a page of shared memory into the memory hole I allocated?

Qemu can map domU memory with no need for a grant reference. Assuming you
allocated a page of RAM in step 1 above, you have not allocated a 'memory
hole' and so there is no mapping into that pseudophysical frame slot to be
done.

> What calls should I be making in qemu to actually map the page?

Probably 'xc_map_foreign_range(xc_handle, domid, XC_PAGE_SIZE,
PROT_READ|PROT_WRITE, pfn_from_your_windows_driver)'

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>