From: "Jan Beulich" Subject: Re: Hvm_emulate_one() and guest_cpu_user_regs()->eip Date: Thu, 17 Oct 2013 10:32:00 +0100 Message-ID: <525FCAB002000078000FBBCC@nat28.tlf.novell.com> References: <525F88A2.4030900@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VWjw5-0007vR-3D for xen-devel@lists.xenproject.org; Thu, 17 Oct 2013 09:32:05 +0000 In-Reply-To: <525F88A2.4030900@gmail.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru Cc: xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 17.10.13 at 08:50, Razvan Cojocaru wrote: > I've noticed that an hvm_emulate_one() call (that uses > guest_cpu_user_regs() for it's context) will succeed _without_ modifying > guest_cpu_user_regs()->eip. Again, this is not only happening when > hvm_emulate_one() returns X86EMUL_RETRY (which I'd expect), but also, in > some cases, when it returns no error. > > Why would that happen, and what might be an example of an instruction > that could cause that if that's normal behaviour? If you've noticed it, you're in a much better position to tell us for which instructions this _is_ happening than we are. As for when this is validly happening - off the top of my head I can only think of repeated string instructions as candidates (where the progress being made is expressed in decreasing [RE]CX) or, in similar ways, LOOPs having their own address as jump target. Jan