All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Backes <john.backes@adventiumlabs.org>
To: xen-devel@lists.xensource.com
Cc: Keir Fraser <keir.xen@gmail.com>, Tim Deegan <tim@xen.org>
Subject: Re: Help With Custom Hyper Calls
Date: Mon, 15 Aug 2011 10:00:41 -0500	[thread overview]
Message-ID: <4E493499.8010107@adventiumlabs.org> (raw)
In-Reply-To: <20110815145626.GI11708@ocelot.phlegethon.org>

I changed the table entries in both xen/arch/x86/x86_32/entry.S and
xen/arch/x86/x86_64/entry.S.  Could you point me towards these existing
kernel mechanisms for issuing hypercalls? Thanks.

- John

On 08/15/2011 09:56 AM, Tim Deegan wrote:
> At 09:45 -0500 on 15 Aug (1313401506), John Backes wrote:
>> So I greped through the s
>>
>> I've altered the hypercall_table and hypercall_args_table to have an
>> additional entry in xen/arch/x86/x86_32/entry.S and in
>> xen/arch/x86/x86_64/entry.S:
>>
> 
> You also need to edit xen/arch/x86/x86_64/compat/entry.S, for the case
> where Xen is 64-bit and dom0 kernel is 32-bit. 
> 
>> static int hyper_init(void){
>>
>>   int output;
>>
>>   printk(KERN_ALERT "Testing Hypercall\n");
>>
>>   __asm__ ( "movl $39, %%eax;"
>>             "int $0x82;"
>>           : "=a" (output)
>>           );
> 
> While this should work, you probably ought to be using the hypercall
> page (and the existing kernel mechanisms) to make hypercalls. 
> 
>>   return SUCCESS;
>> }
>>
>> static void hyper_exit(void){
>>   printk(KERN_ALERT "Removing Hypercall Module");
>>
>>
>> }
>>
>> module_init(hyper_init);
>> module_exit(hyper_exit);
>> ...........................
>>
>> I then run "xm dmesg" to see if I can see the "NEW HYPERCALL RECEIVED"
>> message, but nothing appears.  Any thoughts?
> 
> You could print the return value from the hypercall in your module?
> 
> Tim.
> 

  reply	other threads:[~2011-08-15 15:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 16:19 Help With Custom Hyper Calls John Backes
2011-08-12 17:02 ` Keir Fraser
2011-08-15 14:45   ` John Backes
2011-08-15 14:56     ` Tim Deegan
2011-08-15 15:00       ` John Backes [this message]
2011-08-15 15:10         ` Tim Deegan

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=4E493499.8010107@adventiumlabs.org \
    --to=john.backes@adventiumlabs.org \
    --cc=keir.xen@gmail.com \
    --cc=tim@xen.org \
    --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.