From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Backes Subject: Re: Help With Custom Hyper Calls Date: Mon, 15 Aug 2011 10:00:41 -0500 Message-ID: <4E493499.8010107@adventiumlabs.org> References: <4E4930F2.3050903@adventiumlabs.org> <20110815145626.GI11708@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110815145626.GI11708@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.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. >