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

RE: [Xen-devel] guest physical to xen machine copy?


  • To: 'Dan Magenheimer' <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Sun, 28 Sep 2008 10:37:36 +0800
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc:
  • Delivery-date: Sat, 27 Sep 2008 19:38:03 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Ackg6N/1lA0CfY7pT3Sc+yDHPDUoUQAJVeug
  • Thread-topic: [Xen-devel] guest physical to xen machine copy?

You can try gfn_to_mfn...

Thanks,
Kevin

>From: Dan Magenheimer
>Sent: 2008年9月28日 5:33
>
>Sorry for my poor x86 memory model knowlege...
>
>In some code I am working on, I currently pass the
>address of a guest page from a domain via a hypercall
>and in Xen either copy to or from the guest page
>using:
>
>__copy_from_guest(xen_va, guest_va, PAGE_SIZE)
>
>or
>
>__copy_to_guest(guest_va, xen_va, PAGE_SIZE)
>
>where guest_va is declared as a XEN_GUEST_HANDLE(void)
>
>Now I'd like to switch the hypercall interface so
>that the domain passes a guest physical address
>(or guest physical frame number) instead of a guest
>virtual address.
>
>I see code that does get_gpfn_from_mfn() but not
>the opposite.  What do I need to do to copy a
>page of data from a guest pfn to a Xen mfn (or
>vice versa)?  And is a guest physical address
>still referenced as a XEN_GUEST_HANDLE?
>
>It's probably very simple but I can't find it...
>
>Thanks,
>Dan
>
>P.S. This has to work on 32- or 64-bit guests to
>both 32- and 64-bit hypervisors.
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel
>
_______________________________________________
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®.