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

Re: [Xen-devel] Passing pointers to hypercalls


  • To: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • From: "Amaro, Emmanuel" <amaro@xxxxxxxxxx>
  • Date: Sun, 9 Nov 2014 19:50:21 +0000
  • Accept-language: en-US
  • Delivery-date: Sun, 09 Nov 2014 19:50:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQHP/FGmdYH9wvi+VUqxQYzkRUaDKpxYrbYAgAAGbwA=
  • Thread-topic: [Xen-devel] Passing pointers to hypercalls

Of course. Agh, I forgot to change it to 1.

If someone else looks at this, in my case it means this file: xen/arch/x86/x86_64/entry.S

Thanks!


On Nov 9, 2014, at 2:27 PM, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:

On 09/11/14 19:16, Amaro, Emmanuel wrote:
Hello,

I am trying to pass a pointer to an hyper call in the simplest possible way, set it’s value, an return it to the guest.

I have tried 2 different ways:
- Directly with simple pointers (I read somewhere this would work on x86), but the pointer address is set to 0x0000deadbeef, so dereferencing it causes a panic.
- With XEN_GUEST_HANDLE:
long do_dummy(XEN_GUEST_HANDLE(uint64_t) ptr)
{

It looks like you have introduced a new hypercall called dummy.

I presume from this code that you have filled in a new handler in the hypercall_table, but have you set the expected number of args in the hypercall_args_table?

The default number of args is 0, which cases a debug Xen to deliberately clobber all the registers to 0xdeadbeef

~Andrew

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

 


Rackspace

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