[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] Can't map grant_table between domains
Thanks Wei for an answer. >> >> OOI why do you setup grant table again? My intention is: 1. setup Grant Tables Creates a gnttab setup table t, which requests a grant table with a single element, stored in the grant table variable. > setup_op.dom = DOMID_SELF; > setup_op.nr_frames = 1; > setup_op.frame_list = (uint64_t*)grant_table; > HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup_op, 1); 2. Offer grant to domain B frame is staticaly allocated 4k mem page, shift by 12 because as I understood we need to pass mem frame number > grant_table[0].domid = B; > grant_table[0].frame = *shared_page >> 12; > flags = GTF_permit_access & GTF_reading & GTF_writing; > grant_table[0].flags = flags; I also added wmb(); before setting flags as you suggested, but it doesn't help me. > In any case, there is already a set of API that you can use from > gnttab.c and gntmap.c. Why not just use those? The reason why I don't use API now was because of education purposes, but because now is not working I will try to offer grant using API and consume/map it using my function. As I understood I have to use these followed 3 function (init, alloc, access) to be able to offer grant (from: gnttab.h): void init_gnttab(void); grant_ref_t gnttab_alloc_and_grant(void **map); grant_ref_t gnttab_grant_access(domid_t domid, unsigned long frame, int readonly) I also noticed that I got same error in dmesg if I run only mapper kernel: (XEN) grant_table.c:830:d42v0 Bad domain (0 != 42), or risk of counter overflow 00000002, or subpage 0 my next question "is there any possibility to ensure that offerer domain succesfully offer grant?" I am checking setup_op.status but it is always 0, and also it is set after hypercall, not after writing to grant_table itself. Many Thanks On Mon, Aug 1, 2016 at 3:52 PM, Wei Liu <wei.liu2@xxxxxxxxxx> wrote: On Mon, Aug 01, 2016 at 03:11:48PM +0100, gotoc io wrote: _______________________________________________ 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 |