WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Help With Custom Hyper Calls

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Help With Custom Hyper Calls
From: John Backes <john.backes@xxxxxxxxxxxxxxxxx>
Date: Mon, 15 Aug 2011 10:00:41 -0500
Cc: Keir Fraser <keir.xen@xxxxxxxxx>, Tim Deegan <tim@xxxxxxx>
Delivery-date: Mon, 15 Aug 2011 08:04:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110815145626.GI11708@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CA6B1B19.1F29F%keir.xen@xxxxxxxxx> <4E4930F2.3050903@xxxxxxxxxxxxxxxxx> <20110815145626.GI11708@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10
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.
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel