From mboxrd@z Thu Jan 1 00:00:00 1970 From: leilei175 Subject: Re: how can I find code of hypercall? Date: Wed, 11 Mar 2009 20:37:15 +0800 Message-ID: <49B7B07B.60302@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "xen-devel@lists.xensource.com" , "Jayaraman, Bhaskar" List-Id: xen-devel@lists.xenproject.org Hi, keir and Jayaraman, Thanks for your explanation Keir Fraser wrote: > On 11/03/2009 10:08, "Jayaraman, Bhaskar" 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 : 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 > > > >