[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] The hypercall will fail and return EFAULT when the page becomes COW by forking process in linux

On Mon, 2012-07-02 at 07:40 +0100, Wangzhenguo wrote:
> Hi, everybody
>     I meet a trouble. in dom0, I call the xc_domain_set_pod_target hypercall 
> in one thread, and meanwhile fork a process in another thread, it will return 
> EFAULT by the function of copy_to_user failed in hypervisor. I see that when 
> forking a process, the page will become COW, copy_to_user will cause a wirte 
> protection page fault and return EFAULT. 
>     Is There any ideas for it?

You must lock down any memory to be used as a hypercall argument.

libxc provides the xc_hypercall_buffer interfaces specifically for this

Also in general you should be using libxc instead of open coding your
own hypercalls. In this case xc_domain_get_pod_target() is the function
to use.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.