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] how can I find code of hypercall?

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "leilei175@xxxxxxxxx" <leilei175@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] how can I find code of hypercall?
From: "Jayaraman, Bhaskar" <Bhaskar.Jayaraman@xxxxxxx>
Date: Wed, 11 Mar 2009 17:16:01 +0530
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Wed, 11 Mar 2009 04:46:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5DD423F.4C68%keir.fraser@xxxxxxxxxxxxx>
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: <F4789BF54654AC44982AC0ED2DE2E64B2CC5F223C7@xxxxxxxxxxxxxxxxx> <C5DD423F.4C68%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmiLze25qVhRQx9THC1xnFWIMpGQAAABfhAAAEej4AAAr7X4A==
Thread-topic: [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