>
> A bit more information on this. There is a on-going discussion on the
> errno topic on xen-devel. The safe bet is that if you use errno in the
> os it is probably in the os name space. If you get errno from hypercall
> struct it should be in xen's name space.
>
> Wei.
>

I don't know what is the cause of the vmfunc error, but I'm afraid that
this is not caused by xc_altp2m_set_vcpu_enable_notify, as I can't
reproduce the error using the code below:

#include <xenctrl.h>
> #include <stdlib.h>
> int main(int argc, char *argv[]){
>     domid_t domid;
>     int vcpuid;
>     int rc = -1;
>     if (argc != 3)
>     {
>         printf("arguments error, please input domid vcpuid\n");
>         return -1;
>     }
>     else
>     {
>         domid = atoi(argv[1]);
>         vcpuid = atoi(argv[2]);
>     }
>


    xen_pfn_t new_gfn;
>


    //increase memory reservation for guest
>     rc = xc_domain_increase_reservation_exact(xci, domid, 1,
>         0, 0, &new_gfn);
>     if(rc<0)
>     {
>         printf("fail to increase memory reservation\n");
>         return -1;
>     }
>     printf("added memory:%ld\n",new_gfn);
>


    //map the memory to guest memory space
>     rc = xc_domain_populate_physmap_exact(xci, domid, 1, 0, 0, &new_gfn);
>     if(rc<0)
>     {
>         printf("fail to map increased memory\n");
>         return -1;
>     }
>


    //set #VE info area in VMCS

   * rc = xc_altp2m_set_vcpu_enable_notify(xci, domid, vcpuid, new_gfn);*
>     if(rc<0)
>     {
>         printf("fail to set #ve info page:%ld \n",new_gfn);
>         return -1;
>     }
>     printf("succeed setting #ve info for page:%ld\n",new_gfn);
>

>     //enable #VE in VMCS

    rc = xc_altp2m_set_domain_state(xci,domid,1);
>     if(rc<0)
>     {
>         printf("error enabing #VE\n");
>         return -1;
>     }
>     return 0;


 The code always stops at the xc_altp2m_set_vcpu_enable_notify, which is
used to assign the new page as #VE info page. As I can't debug the Xen
source code, I don't why xc_altp2m_set_vcpu_enable_notify always return -1.
Any ideas?
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to