[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] Sharing pages between two mini-os
Hi all,
I want to implement shared memory mechanism between two mini-os. I started by implementing the example "4.5. Exercise: Sharing Memory between VMs" of the book "The Definitive Guide to Xen Hypervisor" . I have included the necessary files, but when I compile "offering.c", it gives this error: error: incompatible types when assigning to type ‘__guest_handle_ulong’ from type ‘struct grant_entry_t *’ setup_op.frame_list = grant_table; If I use casting for grant_table, like implementing this way: setup_op.frame_list = (XEN_GUEST_HANDLE(ulong))grant_table; The error will be: error: conversion to non-scalar type requested setup_op.frame_list = (XEN_GUEST_HANDLE(ulong))grant_table; .................................................................................. Can anybody help me what is wrong with this implementation? I will post the offering.c code here: #include "../../xen/include/public/xen.h" #include <mini-os/os.h> #include <mini-os/lib.h> #include <mini-os/xmalloc.h> #include <errno.h> #include <xen/grant_table.h> #include <inttypes.h> #include <mini-os/gntmap.h> #include <mini-os/mm.h> #include <mini-os/gnttab.h> #include <mini-os/semaphore.h> //#include <xen/xen/include/public/grant_table.h> extern void * shared_page; extern grant_entry_t * grant_table; void offer_page(void) { uint16_t flags; /* Create the grant table */ gnttab_setup_table_t setup_op; setup_op.dom = DOMID_SELF; setup_op.nr_frames = 1; setup_op.frame_list = (XEN_GUEST_HANDLE(ulong))grant_table; //setup_op.frame_list = grant_table; HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup_op, 1); /* Offer the grant */ grant_table[0].domid = DOMID_FRIEND; grant_table[0].frame = shared_page >> 12; flags = GTF_permit_access & GTF_reading & GTF_writing; grant_table[0].flags = flags; } Thanks _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |