From: Keir Fraser Subject: Re: Crash with c/s 20097 (x86 vmx: Update EIP when appropriate during task switch) Date: Wed, 02 Dec 2009 12:09:48 +0000 Message-ID: References: <20091202114738.GJ14284@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20091202114738.GJ14284@whitby.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan , "xen-devel@lists.xensource.com" Cc: Kouya Shimura List-Id: xen-devel@lists.xenproject.org On 02/12/2009 11:47, "Tim Deegan" wrote: > The __get_instruction_length() _isn't_ safe in those cases where we > later explicitly set inst_len to zero (and possibly in other cases). Argh, stupid, and probably my mistake. I'll push the __get_instruction_length() inside the if()s. > The cases of VM exits encountered during delivery of a software > interrupt, privileged software exception, or software exception include > those encountered during delivery of events injected as part of VM > entry (see Section 22.5.1.2). If the original event was injected as > part of VM entry, this field receives the value of the VM-entry > instruction length. > > Does that mean that if we inject a fault and the guest routes it through > a task switch gate, we'll see the length of VMENTER here? (And should > we be advancing EIP in that case anyway?) Fortunately we never inject software interrupts or exceptions. I reworked the code to avoid that a long time ago, due to just such concerns. Possibly we should even ASSERT as such in the event-injection functions. -- Keir