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

[Xen-devel] Confused about Xen memory management.

To: Xen Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Confused about Xen memory management.
From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Date: Wed, 16 Feb 2005 17:21:36 +1100
Delivery-date: Wed, 16 Feb 2005 06:22:11 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
OK, so I am implementing a prototype where Linux hands an address into
Xen, which gets decremented later (ie. when Xen is executing a different
domain).  It seems that map_domain_mem() is what I want, but how do I
get the physical address of the variable?  virt_to_phys() in Linux
doesn't seem to do the trick, nor virt_to_phys() in Xen.

ie, pseudo code:

linux/mydriver.c:
        static int foo = 1;

        // virt_to_phys(foo) maybe?
        HYPERVISOR_mytest(&foo);

xen/common/test.c:
        int mytest(unsigned long addr)
        {
                // virt_to_phys(addr) maybe?
                manip_later->addr = addr;
                return 0;
        }

        // Some time later
        ...
        int *p = map_domain_mem(manip_later->addr);
        (*p)++;
        unmap_domain_mem(p);

Sorry for the stupid question; I hate VM.
Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

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