|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
[Xen-devel] Question about using xenctl
 
| 
 Hi:   I wanna domU to map dom0's page, so that these two domain can receive/send data between them in the future. But when I run my code , it told me that "Could not open grant table interface(22=invalid argument)".    Can anybody know what the problem is ?   Thanks .                         Danius Wu. ====== The Result of running my codes: [root@vm1 program]# gcc -g -Wall -lxenctrl test.c -o test [root@vm1 program]# ./test  ERROR Internal error: Could not open grant table interface (22 = Invalid argument) Open xcg_handle Error! [root@vm1 program]# 
  ======= Source code: #include <stdio.h> #include <stdint.h>
 #include <time.h>
 #include <sys/select.h>
 #include <xenctrl.h> #include <sys/mman.h>   int main(void)
 {         int xcg_handle;         xcg_handle = xc_gnttab_open();         if(xcg_handle == -1)         {             printf("Open xcg_handle Error!\n");             return -1;         }         else             printf("Open xcg_handle Success!\n");                  void* start_address;         start_address = xc_gnttab_map_grant_ref(xcg_handle, 0, 3,PROT_WRITE);         if(start_address != NULL)         {             printf("mapping success!\n");         }         else         {             printf("mapping errror!=n");         }
          xc_gnttab_close(xcg_handle);                return 0;
 } ==============================================     
    
   
 
22元超值饭面,8.5折纯珍比萨,必胜宅急送网上点餐优惠多_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread>
 |  
- [Xen-devel] Question about using xenctl,
吴佳民 <=
 
 
 |  
  
 | 
    | 
  
  
    |   | 
    |