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

Re: [Minios-devel] Sharing pages between two mini-os



Thanks, I will try it.
regards
Ariani

On Mon, May 1, 2017 at 3:28 PM, Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> wrote:
Ariani A, on lun. 01 mai 2017 15:20:04 -0400, wrote:
> Ok, so could you please do me a favor and  provide a pseudo code for doing
> this? I am totally confused.

        char shared_buffer[PAGE_SIZE];

        gref = gnttab_grant_access(DOMID_FRIEND, virt_to_pfn(&shared_buffer), 0);

then pass gref to the other domain, e.g. through xenstore.

The other domain can then map it:

        struct gntmap map;
        uint32_t domid = DOMID_ORIGIN;
        void *addr;

        gntmap_init(&map);
        addr = gntmap_map_grant_refs(&map, 1, &domid, 0, &gref, 0);



and at the end,

        gntmap_munmap(&map, addr, 1);
        gntmap_fini(&map);

and in the origin domain,

        gnttab_end_transfer(gref);

Samuel

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

 


Rackspace

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