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] hypercall execution path?

To: Daniel Stodden <stodden@xxxxxxxxxx>
Subject: Re: [Xen-devel] hypercall execution path?
From: "Bryan D. Payne" <bryan@xxxxxxxxxxxx>
Date: Thu, 22 Feb 2007 13:30:00 -0500
Cc: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 22 Feb 2007 10:29:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1172168289.12407.28.camel@xxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <45DDD02E.40007@xxxxxxxxxxxx> <1172168208.12407.26.camel@xxxxxxxxxxxxxxxxxxxxxxx> <1172168289.12407.28.camel@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 3.0a1 (Macintosh/20061221)
so: what does it point at? what's the page address, which offset?

On my machine (xen 3.0.4_1, linux 2.6.16.33-xen), the EIP register in the guest's vcpu holds 0xc01013a7. For reference, the hypercall page is 0xc0101000, this is at offset 0x3a7 on that page. Looking at the disassembly from that page at this location, I see the following:

mov 0x1d, %eax
int $0x82
ret

The EIP value is pointing at the 'ret' instruction. Looking in the hypercall table, this (0x1d) is the sched_op hypercall (which is not the hypercall that I called).


after looking into traps.c: take good care with the layout: hypercall
pages on x86_32 are 32 (!) bytes per entry (not 8 as the loop body might
suggest). are your calculations correct?

I believe so, but you can verify with the information that I provided above. 0x1d * 32 = 0x3a0... this matches the offset I'm seeing.

Hopefully someone can help me make sense of this :-)

Thanks,
bryan


-
Bryan D. Payne
Graduate Student, Computer Science
Georgia Tech Information Security Center
http://www.bryanpayne.org

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