All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@XenSource.com>
To: "Bryan D. Payne" <bryan@thepaynes.cc>
Cc: Xen Developers <xen-devel@lists.xensource.com>
Subject: Re: hypercall execution path?
Date: Thu, 22 Feb 2007 18:37:03 +0000	[thread overview]
Message-ID: <1172169424.20968.54.camel@localhost.localdomain> (raw)
In-Reply-To: <45DDE128.1040106@thepaynes.cc>

On Thu, 2007-02-22 at 13:30 -0500, Bryan D. Payne wrote:
> > 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 :-)

The most common reason for sched_op being called is that the vcpu is
idle (SCHEDOP_block).

Are you sure you are looking at the correct vcpu?

How are you looking at the EIP register?

Ian.

  reply	other threads:[~2007-02-22 18:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22 17:17 hypercall execution path? Bryan D. Payne
     [not found] ` <1172168208.12407.26.camel@lapbode42.lrr.in.tum.de>
2007-02-22 18:18   ` Daniel Stodden
2007-02-22 18:30     ` Bryan D. Payne
2007-02-22 18:37       ` Ian Campbell [this message]
2007-02-22 19:11         ` Bryan D. Payne
2007-02-22 20:05           ` Ian Campbell
2007-02-22 20:28             ` Bryan D. Payne
2007-02-22 20:46               ` Ian Campbell
2007-02-22 21:18                 ` Bryan D. Payne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1172169424.20968.54.camel@localhost.localdomain \
    --to=ian.campbell@xensource.com \
    --cc=bryan@thepaynes.cc \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.