From mboxrd@z Thu Jan 1 00:00:00 1970 From: big strong Subject: Re: how to locate the hypercall address in memory? Date: Tue, 14 Jul 2015 22:30:14 +0800 Message-ID: References: <55A515090200007800090A8C@mail.emea.novell.com> <55A51E800200007800090AF7@mail.emea.novell.com> <55A52CFA0200007800090BD2@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1714156785072349045==" Return-path: In-Reply-To: <55A52CFA0200007800090BD2@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============1714156785072349045== Content-Type: multipart/alternative; boundary=001a11c2ade62cb224051ad6aded --001a11c2ade62cb224051ad6aded Content-Type: text/plain; charset=UTF-8 I've read the hypercall related code, such as entry.S hypervisor.h ,etc. But the problem is that hypercall functions are implemented in different files while linux package syscalls into glibc and windows ntoskrnl. There is a hypercall table defined in entry.S. But I havn't found any offsets related information. Besides, I've learned that hypercall page is mapped to a fixed address when the guest is initialized, but which address it is and is this address the base address of hypercall table? 2015-07-14 21:38 GMT+08:00 Jan Beulich : > >>> On 14.07.15 at 15:31, wrote: > > All right, what is the base address of hypercalls table? And which file > > contains the offset of each hypercall? > > Did you at least _try_ to find the answer yourself, e.g. by > grep-ing the hypervisor source for some obvious strings? > > Jan > > > 2015-07-14 20:36 GMT+08:00 Jan Beulich : > > > >> >>> On 14.07.15 at 13:59, wrote: > >> > could you explain that in detail? As syscall tracing, we usually > locate > >> the > >> > kernel module first, then find the address of specific syscall > function > >> in > >> > that module with the help of symbol files. How could this be applied > to > >> > hypercalls then? > >> > >> You'd do whatever you do with the kernel binary with the hypervisor > >> one instead (plus you don't even need to care about modules there). > >> > >> Jan > >> > >> > > > > --001a11c2ade62cb224051ad6aded Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I've read the hypercall related code, such as entry.S = hypervisor.h ,etc. But the problem is that hypercall functions are implemen= ted in different files while linux package syscalls into glibc and windows = ntoskrnl. There is a hypercall table defined in entry.S. But I havn't f= ound any offsets related information. Besides, I've learned that hyperc= all page is mapped to a fixed address when the guest is initialized, but wh= ich address it is and is this address the base address of hypercall table?<= /div>

2015-07-14 2= 1:38 GMT+08:00 Jan Beulich <JBeulich@suse.com>:
>>> On 14.07.15 at 15:31, &= lt;fangtuo90@gmail.com> wrote= :
> All right, what is the base address of hypercalls table? And which fil= e
> contains the offset of each hypercall?

Did you at least _try_ to find the answer yourself, e.g. by
grep-ing the hypervisor source for some obvious strings?

Jan

> 2015-07-14 20:36 GMT+08:00 Jan Beulich <JBeulich@suse.com>:
>
>> >>> On 14.07.15 at 13:59, <fangtuo90@gmail.com> wrote:
>> > could you explain that in detail? As syscall tracing, we usua= lly locate
>> the
>> > kernel module first, then find the address of specific syscal= l function
>> in
>> > that module with the help of symbol files. How could this be = applied to
>> > hypercalls then?
>>
>> You'd do whatever you do with the kernel binary with the hyper= visor
>> one instead (plus you don't even need to care about modules th= ere).
>>
>> Jan
>>
>>




--001a11c2ade62cb224051ad6aded-- --===============1714156785072349045== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============1714156785072349045==--