[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] Can't map grant_table between domains
On Mon, Aug 01, 2016 at 03:11:48PM +0100, gotoc io wrote: > Hi I was trying to make communication between Two mini-os domains. > I have offerer and mapper domains, offerer has ID=A, mapper has ID=B. > > > Offerer function: > > 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); OOI why do you setup grant table again? > 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; > Maybe missing some memory barriers? See gnttab.c:gnttab_grant_access. > > Mapping function: > > gnttab_map_grant_ref_t map_op; > map_op.host_addr = (uint64_t)shared_page; > map_op.flags = GNTMAP_host_map; > map_op.ref = entry; > map_op.dom = A; > HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &map_op,1); This looks reasonable to me. > > After that I always got map_op.status == -1 > More over when I run xl dmesg I got followed error: > > (XEN) grant_table.c:830:d28v0 Bad domain (0 != B), or risk of counter > overflow 00000002, or subpage 0 > > > Any idea what I can do in wrong way? I was trying to follow way how vTPM > driver is working but after faced this error I can't move forward. > 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? Wei. > Thanks for any help. > _______________________________________________ > Minios-devel mailing list > Minios-devel@xxxxxxxxxxxxxxxxxxxx > https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel _______________________________________________ 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 |