[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] sharing memory between qemu and domu without grant tables or vmexits...


  • To: James Harper <james.harper@xxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acttu/Egb94n0I/5RaamETF7xAIFyAAEiHm1AAF2h7AAATuL8Q==
  • Thread-topic: [Xen-devel] sharing memory between qemu and domu without grant tables or vmexits...

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.