All of lore.kernel.org
 help / color / mirror / Atom feed
* size of hypercall parameter
@ 2014-10-10  0:52 Anh Dinh
  2014-10-10  8:29 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: Anh Dinh @ 2014-10-10  0:52 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 379 bytes --]

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.

Is there a limit to the memory region passed into the hypercall?

Cheers,
Anh.

[-- Attachment #1.2: Type: text/html, Size: 557 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: size of hypercall parameter
  2014-10-10  0:52 size of hypercall parameter Anh Dinh
@ 2014-10-10  8:29 ` Ian Campbell
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2014-10-10  8:29 UTC (permalink / raw)
  To: Anh Dinh; +Cc: xen-devel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-10  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-10  0:52 size of hypercall parameter Anh Dinh
2014-10-10  8:29 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.