All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "Amaro, Emmanuel" <amaro@gatech.edu>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Passing pointers to hypercalls
Date: Sun, 9 Nov 2014 19:27:18 +0000	[thread overview]
Message-ID: <545FC016.7060509@citrix.com> (raw)
In-Reply-To: <0D65FE40-5E54-4369-BE06-79EFAF9E3607@gatech.edu>


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

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

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

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

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

  reply	other threads:[~2014-11-09 19:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09 19:16 Passing pointers to hypercalls Amaro, Emmanuel
2014-11-09 19:27 ` Andrew Cooper [this message]
2014-11-09 19:50   ` Amaro, Emmanuel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=545FC016.7060509@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=amaro@gatech.edu \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.