[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] how can I find code of hypercall?



I'm sorry I wasn't aware of this, and I assumed that an instruction prefetch 
operation would always fetch fixed amount of bytes. Not sure now how prefetch 
works in Intel.
Thank you,
Bhaskar.

-----Original Message-----
From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx] 
Sent: Wednesday, March 11, 2009 3:56 PM
To: Jayaraman, Bhaskar; leilei175@xxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] how can I find code of hypercall?

On 11/03/2009 10:08, "Jayaraman, Bhaskar" <Bhaskar.Jayaraman@xxxxxxx> wrote:

> I've done this on an HVM. For Intel, you can go to platform-pci and dump the
> hypercall page on the console 4 bytes at a time. Each 4 byte value on the
> hypercall page constitutes an Intel x86 instruction, and you should find
> something like this: -
> 0xc1010f00 
> 0xccccccc3 

You know x86 instructions are not fixed-length, right? Actually the
instruction sequence is:
 0xb8 <imm32>   : mov imm32,%eax (5-byte instruction)
 0x0f 0x01 0xc1 : vmcall (3-byte instruction)
 0xc3           : ret (1-byte instruction)

See xen/arch/x86/hvm/vmx/vmx.c:vmx_init_hypercall_page().

 -- Keir



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.