From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: size of hypercall parameter Date: Fri, 10 Oct 2014 09:29:37 +0100 Message-ID: <1412929777.10650.12.camel@citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Anh Dinh Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2014-10-10 at 08:52 +0800, Anh Dinh wrote: > I wrote a hypercall that takes in a pointer to memory region: > > > void do_test(char *p){ > ... // do something with the memory in the hypervisor space > } > > > and invoke it in both Dom0 and DomU through privcmd. > > > But when I pass a memory region of tens of KB (not very large), the > system crashes and reboots. You haven't given us very much to go on, at least the hypervisor code doing the accesses and the userspace code which invokes it would be needed for anyone to point out what is wrong. One hint though: You'll notice that no other hypercall takes a raw pointer as you have shown above, they all use the XEN_GUEST_HANDLE_PARAM construct and the associated accessors. Ian.