All of lore.kernel.org
 help / color / mirror / Atom feed
From: david <david_n@gmx.at>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: accessing xen headers from dom0 kernel module
Date: Wed, 29 Dec 2010 19:44:05 +0100	[thread overview]
Message-ID: <4D1B8175.9000600@gmx.at> (raw)
In-Reply-To: <1292925738.4500.1371.camel@zakaz.uk.xensource.com>


On 12/21/2010 11:02 AM, Ian Campbell wrote:
> On Mon, 2010-12-20 at 17:23 +0000, david wrote:
>> hi there,
>>
>> I'm not very familiar with programming kernel modules, so I have a short
>> question about it.
>> Is it possible to use functions defined the in xen/include/ header files
>> of the xen hypervisor in a dom0 kernel-module?
>> I think my dom0 kernel does not export the required symbols to use this
>> functions, so it will not work, right?
>
> The interfaces defined in xen/include are internal to the hypervisor and
> are not available to guests. In particular a guest can never call a
> hypervisor symbol directly as you seem to be asking.
>
> The exception to this is xen/include/public which contains the guest
> (including dom0) hypercall interface (and some other shared-memory data
> structures). A hypercall is a trap somewhat analogous to a system call
> except it is from guest->hypervisor rather than userspace->kernel. They
> are invoked by calling into an offset within the hypercall page (a
> special page populated with the correct trap instruction for the
> architecture).
>
> Most (all?) guests do not build directly against the headers in the Xen
> source tree but instead import a copy into their own source, adjusting
> for local coding style etc. In Linux these interface headers are in
> include/xen/interface. Linux also defines it's own higher level
> interfaces to hypercalls (convenience functions and the like), these are
> generally in include/xen or arch/x86/include/asm/xen.
>
> Ian.
>
>

That's exactly what I wanted to know. Thanks for your fast response.

david

  reply	other threads:[~2010-12-29 18:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 17:23 accessing xen headers from dom0 kernel module david
2010-12-21 10:02 ` Ian Campbell
2010-12-29 18:44   ` david [this message]
2011-01-04 14:19     ` accessing hvm-domU memory from dom0 david

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=4D1B8175.9000600@gmx.at \
    --to=david_n@gmx.at \
    --cc=Ian.Campbell@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.