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: "Jayaraman, Bhaskar" <Bhaskar.Jayaraman@xxxxxxx>, "leilei175@xxxxxxxxx" <leilei175@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] how can I find code of hypercall?
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 11 Mar 2009 10:26:07 +0000
Cc:
Delivery-date: Wed, 11 Mar 2009 03:26:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <F4789BF54654AC44982AC0ED2DE2E64B2CC5F223C7@xxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmiLze25qVhRQx9THC1xnFWIMpGQAAABfhAAAEej4A=
Thread-topic: [Xen-devel] how can I find code of hypercall?
User-agent: Microsoft-Entourage/12.15.0.081119
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